Software I've written


 Home   Links   Software   Olympiad training   Research   Photos   Blog   Confusion 

BuGLe

BuGLe is a utility I use for debugging OpenGL software development. It is also quite handy for graphics research (which is I what I used to do) since it does things like video capture. It is still somewhat alpha, but you can download it from Sourceforge or view the project web page.

Datagrind

Datagrind is a Valgrind tool that captures all read and write accesses made by a program and records them in a log file. A separate tool (dg_view), can then be used to visually represent the reads and write.

Datagrind is implemented as patches on top of Valgrind. It can be downloaded from Gitorious. You can read the manual page for it here.

Jinamp

Jinamp is what I use to play music on my computer. It is aimed at console junkies that want to be able to set some music playing without requiring X or tying up a console. It does everything in the background, although there is a program to do a few simple things like go to next track.

Jinamp can be downloaded from Sourceforge.

Offsets extractor

This is a very simple Python script that uses readelf (from binutils) to obtain DWARF information about structure sizes and offsets, and produces it on stdout in a more easily parseable (and also human-readable) form: offsets.py.

Patches to other software

There are some odds and ends patches to address needs I've had. Some of these I've submitted to the original authors, so you might not even need them in future versions.

mailsync-5.2.1-multiple-pats.patch
mailsync-5.2.1-nocreate.patch
These add some flexibility to mailsync, a symmetric mail synchroniser. The first allows multiple mailbox patterns to be used within a store (which effectively means that you can ask to synchronise a number of mailboxes by name, rather than one or all). The second adds a -N option that will prevent it from creating new mailboxes on either end. I use these patches together to maintain a subset of my folders on a permanently online machine.
uw-imap-2001a-tunnel.patch
uw-imap-2002e-tunnel.patch
This patch improves the IMAP-over-ssh support in c-client (more on IMAP-over-ssh later). It adds a tunnel option to the mailbox naming scheme.
linux-2.6.9-broken-keyboard-sysrq.patch

I have an ancient (well, 1996 era) keyboard that doesn't issue the SysRq sequence quite right: it sends a press/release pair as soon as you press it. That makes the Magic-SysRq feature in Linux impossible to use in older kernels, so I've hacked the keyboard driver to support it. Note that recent 2.6 kernels work around this problem already (I've first noticed this in 2.6.20, but it has probably been fixed for a while).

If you want to check whether your keyboard has this problem, run showkey -s and press and hold Alt-SysRq. If you see scancode 0x54 immediately followed by 0xd4, then you need this patch to use Magic-SysRq on older kernels. If the 0xd4 code only appears when you release the keys, you don't need it.

Tunnelling IMAP over ssh

This section hasn't been updated for years, and I no longer store my mail on a server I have ssh access to. Your mileage may vary.

Wherever possible, I tunnel my IMAP connections over ssh connections. This allows ssh to deal with authentication and means that I can read my mail without ever typing in my password, nor storing it in a file. Here is what I have discovered about support in various clients and servers:

Servers

In general, servers provide a binary (generally imapd) that can be directly invoked by users and which then speaks IMAP on stdin/stdout.

UW-imapd
Works great.
Courier
Courier requires the maildir on the command line. It also prints diagnostics on stderr. This isn't a problem if it is run locally, but gets confused with the IMAP chatter when tunnelled over ssh. You should invoke imapd as
/path/to/imapd $HOME/Maildir 2>/dev/null
Remember to protect the redirect from the shell invoking ssh if necessary. Alternatively, create a wrapper script on the server to do this.

Clients

Mutt
Good support. Add a line something like this to .muttrc:
account-hook 'bmerry@alfonzo' 'set tunnel="ssh alfonzo /usr/sbin/imapd"'
This assumes a friendly server; see above for possible extra arguments.
Pine
Pine has quite flexible support for tunnelling. Here is an excerpt from the configuration file:
# Sets the format of the command used to open a UNIX secure
# shell connection.  The default is "%s %s -l %s exec /etc/r%sd"
# NOTE: the 4 (four) "%s" entries MUST exist in the provided command
# where the first is for the command's path, the second is for the
# host to connect to, the third is for the user to connect as, and the
# fourth is for the connection method (typically "imap")
ssh-command=

# Sets the name of the command used to open a UNIX secure shell
connection.
# Typically this is /usr/bin/ssh.
ssh-path=

# Sets the time in seconds that Pine will attempt to open a UNIX secure
# shell connection.  The default is 15, min is 5, and max is unlimited.
# Zero disables ssh altogether.
ssh-open-timeout=
libc-client based (e.g. mailsync)
libc-client has rather poor support. It will attempt to tunnel over ssh and invoke /usr/sbin/rimapd. If that isn't the path, or you need extra command line arguments, you're out of luck. There are a few ways to get around this though:

Quake

Years and years ago, in the dawn of time, I wrote a mod for Quake. Yes, the original Quake, in all its software-rendered 320x240 glory. It mainly adds a super-rocket, which does evil things like home in on people, but it also suffered some creeping featurism.


 Home   Links   Software   Olympiad training   Research   Photos   Blog   Confusion