Archive for May, 2008

TPG Usage Widget for OS X

Saturday, 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.

TPG Widget - Front


TPG Widget - Back

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

Updated PHP SVN Client

Monday, 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


- 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