<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://samburney.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>Sam Burney&#039;s Random Useless Blog -</title>
 <link>http://samburney.com/frontpage</link>
 <description>The basic front page view.</description>
 <language>en</language>
<item>
 <title>Graph uptime for Linux devices via SNMP with Cacti</title>
 <link>http://samburney.com/blog/graph-uptime-linux-devices-snmp-cacti</link>
 <description>&lt;p&gt;Cacti is a great tool for graphing your network load as well as a whole bunch of other data from SNMP enabled devices.  One glaring ommision however is the ability to graph the uptime of your devices.&lt;/p&gt;
&lt;p&gt;Cacti allows you to make custom data/graph templates that allow you to graph pretty much any data your heart desire, as long as you have a data source of some kind.  I found a tutorial Andrew McMillan which described exactly what I was after - how to graph the uptime of a Linux device via SNMP, but as it&#039;s not exactly for the faint of heart I&#039;ve decided to post my template definitions here so that if anyone else needs this they can get going in a matter of seconds.&lt;/p&gt;
&lt;p&gt;Usage:&lt;/p&gt;
&lt;p&gt;1. Download &lt;a href=&quot;/system/files/cacti_graph_template_ucdnet_-_uptime.xml&quot;&gt;cacti_graph_template_ucdnet_-_uptime.xml&lt;/a&gt;&lt;br /&gt;
2. Logged into you Cacti console, click &#039;Import Templates&#039;&lt;br /&gt;
3. Click browse, locate the graph template you just downloaded, then click save&lt;br /&gt;
4. Add a graph for &#039;ucd/net Uptime&#039; to your devices as needed&lt;/p&gt;
&lt;p&gt;Easy!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://samburney.com/blog/graph-uptime-linux-devices-snmp-cacti&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://samburney.com/blog/graph-uptime-linux-devices-snmp-cacti#comments</comments>
 <category domain="http://samburney.com/category/tags/cacti">cacti</category>
 <category domain="http://samburney.com/category/tags/linux">linux</category>
 <category domain="http://samburney.com/category/tags/snmp">snmp</category>
 <pubDate>Thu, 04 Jun 2009 11:37:45 +0900</pubDate>
 <dc:creator>Sam Burney</dc:creator>
 <guid isPermaLink="false">14 at http://samburney.com</guid>
</item>
<item>
 <title>sifnt Modal - jQuery Port</title>
 <link>http://samburney.com/blog/sifnt-modal-jquery-port</link>
 <description>&lt;p&gt;I think the thing I enjoy most about computers is learning new things; finding new, better and/or more efficient ways of performing a task.  In order to do this, I will often look for new ideas to implement when beginning even a boring mundane project to make it more challenging and to ensure I come out of the other end having learnt something new.&lt;/p&gt;
&lt;p&gt;With one (Of the many) projects I&#039;m working on at the moment I&#039;ve decided to use it as a chance to learn the &lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery &lt;/a&gt;JavaScript library, which seems pretty neat so far.  One of the dependancies of this project is &lt;a href=&quot;/blog/sifnt-modal&quot;&gt;sifnt Modal &lt;/a&gt;which of course was written with the &lt;a href=&quot;http://prototypejs.org&quot;&gt;Prototype &lt;/a&gt;library in mind, so a port of that was needed before I could even start!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://samburney.com/blog/sifnt-modal-jquery-port&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://samburney.com/blog/sifnt-modal-jquery-port#comments</comments>
 <category domain="http://samburney.com/category/tags/coding">coding</category>
 <category domain="http://samburney.com/category/tags/javascript">javascript</category>
 <category domain="http://samburney.com/category/tags/jquery">jquery</category>
 <category domain="http://samburney.com/category/tags/sifnt-modal">sifnt modal</category>
 <pubDate>Fri, 03 Apr 2009 08:58:41 +0900</pubDate>
 <dc:creator>Sam Burney</dc:creator>
 <guid isPermaLink="false">13 at http://samburney.com</guid>
</item>
<item>
 <title>YC09 Photos</title>
 <link>http://samburney.com/blog/yc09-photos</link>
 <description>&lt;p&gt;My YC09 (Youth Conference &#039;09, Sydney) photos are up in the gallery (almost) as they happen.&lt;/p&gt;
&lt;p&gt;Enjoy!&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://www.sifnt.net.au/gallery2/v/Christadelphian+Events/YC09+Sydney/&quot; title=&quot;http://www.sifnt.net.au/gallery2/v/Christadelphian+Events/YC09+Sydney/&quot;&gt;http://www.sifnt.net.au/gallery2/v/Christadelphian+Events/YC09+Sydney/&lt;/a&gt;&lt;/p&gt;
</description>
 <comments>http://samburney.com/blog/yc09-photos#comments</comments>
 <category domain="http://samburney.com/category/tags/2009">2009</category>
 <category domain="http://samburney.com/category/tags/christadelphian">christadelphian</category>
 <category domain="http://samburney.com/category/tags/conference">conference</category>
 <category domain="http://samburney.com/category/tags/gallery">gallery</category>
 <category domain="http://samburney.com/category/tags/photos">photos</category>
 <category domain="http://samburney.com/category/tags/sydney">sydney</category>
 <category domain="http://samburney.com/category/tags/yc09">yc09</category>
 <category domain="http://samburney.com/category/tags/youth-conference">youth conference</category>
 <pubDate>Tue, 06 Jan 2009 20:34:44 +0900</pubDate>
 <dc:creator>Sam Burney</dc:creator>
 <guid isPermaLink="false">11 at http://samburney.com</guid>
</item>
<item>
 <title>Regular Expression to match a Windows (Local and UNC) or UNIX Path</title>
 <link>http://samburney.com/blog/regular-expression-match-windows-or-unix-path</link>
 <description>&lt;p&gt;
I&#039;ve been looking for a regular expression (regex) to get a path, file name and extension from a full UNIX path for a small app I&#039;m working on but could only come across Windows ones.
&lt;/p&gt;
&lt;p&gt;
For anyone looking, here I&#039;ve come up with what I was looking for: A regular expression to match a Windows (Both UNC and Local paths) or UNIX paths as well as breaking that path into it&#039;s relavant segments all in one go.
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;Regular Expression:&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
^(.*?/|.*?\\)?([^\./|^\.\\]+)(?:\.([^\\]*)|)$
&lt;/p&gt;
&lt;p&gt;
&lt;b&gt;PHP Function Example:&lt;/b&gt;
&lt;/p&gt;
&lt;pre&gt;
// Split filepath path, name and extension
function namesplit($path)
{
preg_match(&#039;@^(.*?/|.*?\\\\)?([^\./|^\.\\\\]+)(?:\.([^\\\\]*)|)$@&#039;, $path, $namesplit);
return $namesplit;
}
&lt;/pre&gt;&lt;p&gt;
&lt;b&gt;Output Example:&lt;/b&gt;
&lt;/p&gt;
&lt;pre&gt;
Array
(
[0] =&amp;gt; /path/to/file/filename.ext
[1] =&amp;gt; /path/to/file/
[2] =&amp;gt; filename
[3] =&amp;gt; ext
)
&lt;/pre&gt;&lt;p&gt;
I hope this saves someone some time!
&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://samburney.com/blog/regular-expression-match-windows-or-unix-path&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://samburney.com/blog/regular-expression-match-windows-or-unix-path#comments</comments>
 <category domain="http://samburney.com/category/tags/coding">coding</category>
 <category domain="http://samburney.com/category/tags/php">php</category>
 <category domain="http://samburney.com/category/tags/regular-expression">regular expression</category>
 <pubDate>Tue, 02 Dec 2008 20:23:48 +0900</pubDate>
 <dc:creator>Sam Burney</dc:creator>
 <guid isPermaLink="false">10 at http://samburney.com</guid>
</item>
<item>
 <title>A Working BluePhoneElite2 / iSync Sync-When-in-BlueTooth-Range AppleScript</title>
 <link>http://samburney.com/blog/working-bluephoneelite2-/-isync-sync-when-bluetooth-range-applescript</link>
 <description>&lt;p&gt;I love integration, the ability to have one device do a million different things, like the &lt;a href=&quot;http://www.nokia.com.au/A41175727&quot; target=&quot;_blank&quot;&gt;Nokia E71&lt;/a&gt; (Another story ;)).  I also love to have the ability to have the same information available on all of my different devices (Laptop, Desktop, Mobile phone(s), etc...).&lt;/p&gt;
&lt;p&gt;When I was using Windows on my main computer, I used Nokia&#039;s &lt;a href=&quot;http://www.nokia.com.au/A4520009&quot; target=&quot;_blank&quot;&gt;PC Suite &lt;/a&gt;to synchronise my calendars and contacts with my phone via bluetooth.  One of the great things about Nokia&#039;s sync tool is that it can automatically sync on a regular intervalof your choosing, or even sync when it detected your phone within range.&lt;/p&gt;
&lt;p&gt;When I moved to Mac OS it felt like a breath of fresh air.  The iSync plugin for my phone was tiny and simple to install, bluetooth no longer freaking crashed all the time and the Apple Address Book/iCal combination kicks Outlook&#039;s ugly butt.&lt;/p&gt;
&lt;p&gt;All this was great, but for whatever silly reason Apple neglected to include the ability to syncronise your devices on a schedule (iSync can do it for MobileMe, but not devices).&lt;/p&gt;
&lt;p&gt;Another application I use is &lt;a href=&quot;http://mirasoftware.com/BPE2/&quot;&gt;BluePhoneElite&lt;/a&gt;, and it you own a Nokia S60 phone and a Mac with bluetooth I seriously recommend you give it a go, it&#039;s an amazing piece of software.  BluePhoneElite can, among other things, do &#039;stuff&#039; when it detects a phone come into range, it even includes an example AppleScript to do exactly what I&#039;m after, force an iSync device synchronisation when it detects a phone come into rang, but it doesn&#039;t work!&lt;/p&gt;
&lt;p&gt;After a bit of playing around with the two supplied AppleScripts and quite a lot of Googling I came up with a working script&lt;/p&gt;
&lt;p&gt;&lt;b&gt;BluePhoneElite / iSync AppleScript&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Links: &lt;a href=&quot;/sites/samburney.com/upload/run-isync.applescript&quot;&gt;Download &lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Instructions:&lt;br /&gt;
- Download to your computer&lt;br /&gt;
- In BluePhoneElite, add in &#039;In Range&#039; handler and specify this AppleScript&lt;/p&gt;
&lt;p&gt;Once installed, every time your phone comes into range this AppleScript will be run.  The script checks to see if your phone has been synchronised in the last 2 hours (This is configurable), and if not it synchronises it immediately. &lt;/p&gt;
&lt;p&gt;&lt;b&gt;Updated 2/3/2009&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;I have updated the download link to contain a version that supports BPE2.1&#039;s AppleScript changes.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://samburney.com/blog/working-bluephoneelite2-/-isync-sync-when-bluetooth-range-applescript&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://samburney.com/blog/working-bluephoneelite2-/-isync-sync-when-bluetooth-range-applescript#comments</comments>
 <category domain="http://samburney.com/category/tags/apple">apple</category>
 <category domain="http://samburney.com/category/tags/applescript">applescript</category>
 <category domain="http://samburney.com/category/tags/bluephoneelite">bluephoneelite</category>
 <category domain="http://samburney.com/category/tags/coding">coding</category>
 <category domain="http://samburney.com/category/tags/isync">isync</category>
 <category domain="http://samburney.com/category/tags/mobile">mobile</category>
 <enclosure url="http://samburney.com/system/files/run-isync.applescript" length="1711" type="application/octet-stream" />
 <pubDate>Fri, 14 Nov 2008 14:50:04 +0900</pubDate>
 <dc:creator>Sam Burney</dc:creator>
 <guid isPermaLink="false">8 at http://samburney.com</guid>
</item>
</channel>
</rss>

