June 21st, 2008
Update: Make sure you get the latest version of the widget!
As requested by a few users, I’ve updated the TPG Usage Widget to be a bit smarter about setting the yellow and red levels in on the indicators.
Previously, yellow was at 75% of maximum, and red at 90%.
The widget now considers the level your usage should be at, given your monthly limit and how much of the month is left. If you’re beyond this point, the indicator bar will be red. If you’re within a day of hitting this limit then the indicator bar is yellow.
Try it out… it makes a lot more sense when you see this in action. Any feedback on this is welcome!
(Also fixed a bug in the days countdown)
Download TPG Usage Widget (version 1.2, 88kb)
Update 27/07/08: Update 1.4 to fix a major bug
Posted in JavaScript, Mac OSX, Open Source, Projects, TPG Usage Widget | 8 Comments »
June 16th, 2008
I’ve just added a top 5 riders list to the BikeJournal Facebook App.
This shows the users who have ridden the furthest in the current month, and sits at the bottom of the config screen so only logged in app users will be able to see it, but I’ll find somewhere better for it.

Posted in BikeJournal Facebook App, Projects | No Comments »
May 17th, 2008
Update: Make sure you get the latest version of the widget!
Since I’ve hit my bandwidth limit with TPG this month, I figured a Mac OS X dashboard widget would be a good way of keeping tabs on my usage in future. The only one already available didn’t work for me, so I made my own.


It’s pretty simple it shows your choice peak usage, offpeak, both or both combined and you can set your bandwidth limits.
Download TPG Usage Widget (version 1.2, 88kb zip)
I’m not sure how frequently TPG update their Your Account area with bandwidth information, but this is where the widget gets the data from.
Resources I found useful for this:
- Dashcode - the first time I’ve used an IDE. It wasn’t bad once I stopped typing vim commands, but there’s still a little bit of “magic” that’s hidden from you
- Mostly existing widgets. It’s all just JavaScript, HTML, CSS under the hood. Right-click any widget and do “Show Package Contents”
- A very introductory tutorial
- The Flip Side - Some useful tutorials, just search
The biggest gotcha for this app was allowing network access (under Widget Attributes in dashcode, or in Info.plist). It turns out if you make an XMLHttpRequest with this disabled, the request doesn’t happen (obviously), but no error is thrown and you just get an empty string for responseText
Update 1/06/08: Updated the widget to fix some very minor bugs, and adding usage expiry date information, as requested by a few people.
Update 22/06/08: Update to improve the indicator values and fixed minor expiry days countdown bug
Update 27/07/08: Update 1.4 to fix a major bug
Posted in JavaScript, Mac OSX, Open Source, Projects, TPG Usage Widget | 9 Comments »
May 12th, 2008
I’ve been working on a frontend for multiple SVN repositories (I’ll write more about this later) and have been using the the Sixdegrees PHP SVN Client library.Since I’ve made some changes to the library, I thought I’d share them here. The changes/fixes I’ve put in mostly relate to the commit logs (I haven’t really used the other features), but will hopefully be of use to others
Changes:
- Added support for non-standard port numbers (rewrote cleanURL)
- getFileLogs will now include an array of files, if multiple files have been modified
- added setRepository method, to fix mis-spelling of old setRespository method
- various bugfixes (out by one error on getFileLogs)
Download Updated PHP SVN Client (zip, 22kb)
You might want to check the original package page for more information When investigating the SVN/WebDAV procotol, the following links were useful (documented here so I don’t have to find them again)
Update 23/06/08: This project is being actively developed by a few people (including myself). The new project homepage is at http://phpsvnclient.googlecode.com
Posted in Open Source, PHP, Projects | 6 Comments »
January 6th, 2008
My BikeJournal/Facebook app is ready for general use.
This app grabs your journal from BikeJournal and displays it on your Facebook. The profile box will automatically be updated with all your BikeJournal rides at 10PM Melbourne time (6AM US EST)
This is what the output looks like (from my profile)

At the moment, the options are pretty slim. You can select the columns from your journal to display:

You can install the app here , and I have a TODO list here
I must say that the Facebook platform is pretty nice. A few gotchas, but nothing that really held me up for too long. As should be the case, the majority of my time was spent on my side of the app development (not Facebook integration). In fact, the biggest issue I ran into was parsing the HTML of the BikeJournal journal page.
Tags: BikeJournal Facebook App, facebook
Posted in BikeJournal Facebook App, Projects | 3 Comments »
October 22nd, 2007
I’m sure this is documented in more detail elsewhere, but since this has caught me out a few times, I’ll document this here.
The javascript substr() function works differently in IE and Firefox.
var myString = "hello world";
myString.substr(-3);
In Firefox this returns “rld”, but throws an error in IE. To do the same thing in both IE and Firefox:
var myString = "hello world";
myString.substring(myString.length(-3), myString.length);
Posted in JavaScript | 1 Comment »