GitWeb Hacking.

Recently I setup gitweb on one of my servers to allow a web-based frontend to any git projects which the users of the server place in their ~/git/ directory.

After playing about with it, I noticed that it allowed for placing a README.html file in the git config directory to allow extra info to be shown on the summary view, managed to get it to pull the README.html file from the actual repository itself, and not the config directory, thus allowing the README.html to be versioned along with everything else, and not require the user to edit it on the server, but rather just edit it locally and push it.

New Phone – T-Mobile G1.

Recently I acquired a T-Mobile G1 to replace my old T-Mobile MDA Vario 2 (HTC Hermes).

All I can say about this phone is that it is quite awesome. I no longer need to run an exchange server to keep my contacts/calendar synced somewhere as the G1 syncs everything to Google Mail/Calendar.

Its a really good phone and I recommend it to anyone who is thinking of getting a new phone, the integration with Google is especially useful, and the full-html (including CSS and javascript) is very nice.

JDesktopPane Replacement

As as I mentioned before I’ve been recently converting an old project to Java.

This old project was an MDI application, and when creating the UI for the conversion, I found the default JDesktopPane to be rather crappy. Google revealed others thought the same, one of the results that turned up was:

So, I created DFDesktopPane based on this code, with some extra changes:

  • Frames can’t end up with a negative x/y
  • Respond to resize events of the JViewport parent
  • Iconified icons move themselves to remain inside the desktop at all times.
  • Handles maximised frames correctly (desktop doesn’t scroll, option to hide/remove titlebar)

My modified JDesktopPane can be found as here part of my dflibs Google code project.

Other useful things can be found here, take a look and leave any feedback either here or on the project issue tracker

GMail – apply labels to email from group members

NOTE: The information in this article has been superceeded by this one.

As Noted by Chris recently on IRC, Google Mail lacks a feature in its ability to automatically label/filter messages - you can’t do it based on emails from people in a contact group, short of adding a filter with all their email address on it.

At the time it was mentioned this didn’t affect me, however later when I got round to adding loads of labels/filters in gmail (yay for, nicely coloured inbox!) to nicely separate things for me I also ran into this problem, so came up with the following python script that does it for me.

It checks messages, sees if the sender is in the contacts, then checks each group to see if there is a label with that group name that is not already set, then checks to see if the contact is in the group, and finally sets the label if everything matches up.


I was recently looking at converting an old application from VB6 to Java that used MD5 in its output files as hashes for validation.

The first thing I did was to make a java class that read in the file and checked the hashes, I tried it on a few files and it worked fine, then I found a file that it failed on.

Now, this app wrote all the files using the exact same function, so it seemed odd that 1 of them wouldn’t parse and the rest would.

When I looked at the file closer, I found that this one contained some symbols in the output that the others didn’t - I eventually figured out that the symbol that was causing the problem was the pound sign (£).

Without going into too much detail, this presented a major problem, the string in question was used as part of the password validation for the app (the output files are encrypted using the password as a key), and the java code was getting different results than the old VB6 code, and was unable to decode the file as a result.

So, this sparked my curiosity a bit, the VB6 code I was using wasn’t a built in, it was code I’d gotten elsewhere and used, so I assumed it was faulty code (not that this helped me much, as I needed to get the exact same output, but ignoring that).

“Dr. Horrible’s Sing-Along Blog – Act 3” a Dissapointment

Despite all the “This was amazing” “fantastic” reviews I seem to find for this everywhere, I found myself disappointed after watching it.

The first 2 acts were funny and very rewatchable, there was gold bars that became gold liquid, the “Bad Horse” letters and phone calls, Captain Hammer and his “Hammer”, they made me laugh and alongside the humour was a kick ass sound track (my personal favourite being “Its a brand new day”).

Act 3 on the other hand was a complete change in direction, the songs weren’t as good, it wasn’t really all that funny (Infact I think the only bit I laughed at was him stopping his song to correct the spelling of his name), it suddenly became all serious. All in all I found it a rather disappointing, and somewhat obvious, end and a let down to an otherwise awesome show.

Despite this I’m still going to buy the DVD (and hopefully the OST if one comes out), as I approve of the idea of a web-streamed show (I think there was a push to get a firefly season 2 done in this way at one point) and would like to see more of them.

Yakuake on OS X – Almost

For a while now (pretty much since I’ve been using Linux) I’ve been using yakuake, and I’ve been looking for something similar for OS X (at the moment I tend to ssh from my desktop to my OS X machine to do anything console like).

I found visor which wraps, but overall this is a poor replacement primarily for the lack of tab support (I use tabs a lot in yakuake, at the moment on my desktop I have ~15 open)

I tried to get yakuake working on OS X a while ago and failed (it wouldn’t compile) so gave up, recently however I decided to try again and have made better progress.

This is what I did, its probably not the best way of doing it (for example, the initial 3GB download could probably be reduced).

Virtualbox Bridging

Edit: This is now pretty much unneeded, the new version of VirtualBox seems to handle this all nicely on its own.

As I mentioned in my last post, One of the useful advantages of the network boot setup is that I can use it to quickly install virtual machines.

Now a few things:

  • My Desktop is a lot more powerful than my server, so I run the virtual machines on it.
  • I use virtualbox rather than vmware.
  • All the network boot stuff is on my server not my desktop (obviously)

So in order to allow this, virtualbox needed to be setup to bridge to my existing adapter, this was quite straight forward, pretty much exactly as the manual said.

PXE Goodness

So as you may or may not know from time to time I have the joy of fixing computers for various people. A lot of these fixes result in a reinstall of windows and away.

This is a rather easy enough job, I have a KVM switch that I attach to the machine, pop a windows CD in (I used to have an unattended CD but don’t any more), answer a few questions and then occasionally switch the KVM over to see if the install died or so.

Now this is all well and good except for 2 problems:

  1. It means I need to keep (or remember to bring) windows CDs at home (where I do most of my jobs)
  2. I recently had a machine to fix that had a non-working CD Drive

Now, the first one isn’t so much of a problem, but the second one was.


Recently I finally finished adding support for AuthGate to be an OpenID Provider.

This prompted Chris to develop Poidsy, which I have also implemented into AuthGate. This allows people to login to AuthGate (and thus also here, and other AuthGate powered sites) using OpenID instead of having to register with AuthGate itself.