Another power cut. I went to bed late last night after spending all evening catching up with various things (OK, browsing del.icio.us). I was just taking a leak at about 2am, on my way to bed, when all the lights went out, and I heard the sudden silence of my servers powering off. The servers are on the landing outside the bathroom at the moment because my brother has the spare room. I found my way upstairs using the feeble light of my P900 and found a torch in my bedside table. I then used my P900 again to find my way to the kitchen where I knew I had some batteries. Once the torch was working I went to check the distribution board in the basement and everything was still switched on, so it was definitely a power cut. I checked outside and the street lamps were still on, as were some lights in the houses opposite. I did the only thing left to do - I went to bed. Unfortunately I then heard Matthew (my 3 year old son) getting up to see why his night light had switched off, then crying out when he found that it didn't come on again no matter how many times he toggled the switch. In then end I went to get him and he got into our bed. An hour later and he still wasn't asleep, so he got put back into his own bed, which he wasn't very happy about. The power came back on at about 05:30, which woke me up (briefly). I'm now at work, desperately trying to stay awake.

This is so useful (to a developer) that I'm blogging it so I have a record of it when I need it in the future. You know how you can test a webserver by opening a telnet connection to port 80? Well by the magic of OpenSSL you can do the same thing on port 443. openssl s_client -connect example.com:443 -state
Then you just type away the same as if it was a normal telnet session to port 80, i.e.
GET /some/url HTTP/1.0
Host:example.com

server response here...

I'm gutted that this book is currently out of stock.

A response to this article on codepoetry. I'm not really sure why anyone ever thought that voting machines were a good idea. And by voting machines I mean anything from a touch screen to a mechanical hole-punching lever thingy. Here in the UK, you turn up at your local polling station, and show them your voting slip, which you will have received in the post a few weeks earlier. You will probably have to join a short queue, the one appropriate to your street address. So you look for your street on a sign, and join the appropriate line. When you get to the front of the line, they look up your name in a big book. When they find your name they cross it out with a pen, and hand you your ballot paper(s). Very high tech. The ballot paper is just a sheet of paper with a box next to each name. You put an 'X' in the box next to the person you're voting for, using a pencil which is attached to the desk in the voting booth with a piece of twine and some sticky tape. You fold it over once, exit the booth, and post the paper into a box. The box is sealed with a tamperproof fastener, and the only opening is a thin slot in the top. At the end of the day, all the boxes get taken to the regional centre, opened, and the votes counted. By hand. If a recount is needed, that's done by hand as well. I can remember a few times when they've had about 4 recounts for a particular seat, because the margin was in the order of 10 votes. I've been eligible to vote now for 14 years, and that's how it's *always* been done. You even recognise the same rickety wooden booths every time you return to the same polling station (in my case, the community centre round the corner from our house). Even during a general election, the whole country's votes are counted by 2 or 3am. Now sure, the USA has a much larger electorate than us, but that also means they have a much larger pool to draw on for vote counting volunteers.

I use Command-Up and Command-Down in Safari all the time. They are equivalent to the home and end keys, but they are a lot easier to use because there is a Command key right next to the arrow keys on my PowerBook keyboard, but the fn key is the other side of the keyboard and therefore needs two hands. Another pair of useful keystrokes is Command-Left (Back) and Command-Right (Forward). To make these work in Firefox, you have to edit one of the files, /Applications/Firefox.app/ Contents/MacOS/res/builtin/platformHTMLBindings.xml. Open that file in an editor and find the section that starts <binding id="browser">. Inside that section you'll see a load of <handler event="keypress"... lines. Add the following lines somewhere in that section: <handler event="keypress" keycode="VK_UP" modifiers="accel" command="cmd_scrollTop"/>
<handler event="keypress" keycode="VK_DOWN" modifiers="accel" command="cmd_scrollBottom"/>
<handler event="keypress" keycode="VK_LEFT" modifiers="accel" command="Browser:Back"/>
<handler event="keypress" keycode="VK_RIGHT" modifiers="accel" command="Browser:Forward"/>
Save the file and restart Firefox to apply the changes. Don't forget though, because you've edited one of the files included in Firefox.app, if you upgrade Firefox you'll need to apply the changes again. There is supposed to be a mechanism whereby you can make the change in your user profile directory, but that feature is currently broken.