Damn, conkeror is the most awesome thing ever. It basically gives you an emacs style interface to firefox. This is not just emacs key bindings for text boxes and stuff but a full on emacs style interface, with a status bar and entry box at the bootom, and none of this toolbar and menu stuff crufty up the page.
Instead of tabs you just have multiple buffers, which you can move between with the normal emacs key combinations. Huzzah!
I guess it isn't too suprising that this masterpiece comes from Shawn Betts, who also gave us ratpoison.
Of course it ain't perfect yet. It would be amazingly cool if it supported
C-x 2 (split windows) and C-x B (list buffers). Also
if there was a way I could still use the developer toolbar that would be good too.
The ssh ProxyCommand option is just really insanely useful. The reason I want to use it is that it makes it easy to tunnel ssh through a firewall. So for example you have a machine on your corporate network that is is sitting behind a firewall, but you have a login to the firewall. Now of course you could just do:
laptop$ ssh gateway gateway$ ssh internal internal$
or something like:
laptop$ ssh -t gateway ssh internal internal$
But that really doesn't work very well if you use scp or sftp or some other service like revision control that runs on top of it. This is where you can use ProxyCommand option to make your life easier. Basically you want to put something like this into you .ssh/config:
Host internal
ProxyCommand ssh gw nc -w 1 internal 22
For this to work you will need netcat (nc) installed on the gw, but that generally isn't too much of a problem. Now you can transparently ssh, scp or whatever to internal, and ssh deals with it.
Now of course if you can't get into the network full stop, you need some reverse tunneling tricks and some other host on the interweb which you can use to tunnel through. So something like:
ssh -f -nNT -R 1100:localhost:22 somehost
Will setup a remote tunnel, which basically means if you connect to
port 1100, it will be forwarded to port 22 on the machine on which you
ran ssh -R. Unfortunately unless you have full control
over the host you are creating the reverse tunnel too, you will find
that port 1100, will only be bound to localhost, which means you will
probably still need to use the trick mentioned above to get seemless
access to it.
I'm sometimes suprised of the things I don't know. For
example, after using Linux as my primary machine I only just
found out that less -R will make less correctly
markup ANSI escape sequences, so when I pipe
ls --color or pylint
through it I get something readable, rather than raw escape codes.
When you write scripts that run as cron jobs, and send email to people, and have the potential to send a *lot* of email to people you really don't want to screw up.
Unfortunately I did screw up when writing one of these. It was a pretty simple 200 lines or so python script that would find any new revisions that had been commited since the last time it ran, and email commit messages to developers.
The idea was simple, a file kept a list of the last seen revisions, I would go through the archive find new revisions, mail them out, and then finally write out the file with the latest files.
Spot the bug, or at least the design error? When our server ran out of disk space, the stage of writing out the the file with the last seen revisions failed, and created an empty file. So next time the script ran it thought all the revisions were new, resulting in thousands of email about revisions committed years ago. I pity our poor sysadmin who not only had to deal with out of disk problems but now also with a mail queue with thousands of messages.
Solution to the problem of course is try and write out the new revision file before sending the email, and write it to a temporary file, instead of blasting the last known good out of existance by writing directly over the top of it.
I guess the moral is designing these little scripts actually requires more care than I usually give them.
I do a lot of hacking with binary files at work, and simply doing a diff to check if two files are the same isn't really useful, I usually want to preprocess the file with some command to make it into useful plain text. This ends up being quite tedious by hand. I came up with this simple script, diffcmd, but I'm sure the lazyweb will let me know of anything better if it exists.
Usage: % diffcmd "readelf -a" file1 file2
#!/bin/sh CMD=$1 FILE1=$2 FILE2=$3 TMP1=`tempfile` TMP2=`tempfile` $CMD $FILE1 > $TMP1 $CMD $FILE2 > $TMP2 diff -u $TMP1 $TMP2 rm $TMP1 $TMP2
Huzzah, we now have actual street maps with google. Recently the Dept. of Lands changed their interface, which meant a couple of hours updating my Geocoder. You can now lookup addresses and get maps at http://www.benno.id.au/map and can download my python script for querying the Lands database.
Fun in the lab this week, we got an Intel Mac Mini last Friday, and today Chuck got L4 up and booting on the Mac Mini.
This is a bit different to just getting a standard
OS up and running. For a start we a booting new development
kernels all the time, so its nice to be able to transfer an image
across without having to move media around. Also you do a lot of
printf debugging so having a decent terminal is
important. Usually for developing L4 we boot over the network and
use the serial console for terminal debugging. Unfortunately the
Mac Mini doesn't have a serial port, and getting a toolchain to compile
EFI modules that enable network booting was somewhat problematic.
Enter Firewire. This lets us just use one cable to connect to the workstation which we can use for downloading and serial deubgging. Awesome! So Chuck boots ELILO from EFI, which then loads a simple Firewire driver. From the desktop side, a simple app is used to copy the image across and act as a console. Rock on!
With any luck we will have a working Darbat up and running on the Mac Mini by the end of next week.
Today I release the first version of nswgeo. It is a simple python script that queries the NSW Department of Lands GeoSpatialPortal to find the location of addresses in NSW.
<rant>Why can't I do man g_assert? Why doesn't
GNOME provide man pages for glib?</rant>
Ok, I guess there are some good reasons, but from a user point of view
it is pretty frustrating. Of course man pages aren't that great
if you are trying to find a particular function that does what you
are after, but if you are trying to understand existing code
just being able to do man function_name is really
nice.
I guess I should stop ranting and start writing, but from initial glances on the intarweb it seems that people aren't that interested in man pages anyway.

It's interesting to see what headlines end up next to each other sometimes. I really like the Microsoft makes your passwords more secure, followed by the more security flaws in Windows.