hjp: Programs


Here are some programs I wrote. They are provided in source and have been compiled at several Unix platforms, but you should expect to have to tweak the Makefile to compile them (no "./configure"). For most you will also need GNU make (at your friendly GNU archive), a GNUmakerules file and the ant library.

This little program produces a list of the time zone offset for every day since 1880.


Tiling of an aztec diamond with the algorithm presented by Burkard Polster (aka Mathologer) in The ARCTIC CIRCLE THEOREM or Why do physicists play dominoes?]

To start the animation, simply load the demo page in a browser.

The source code is in github.

utf8dump interpretes stdin as a UTF-8 stream and dumps the codepoint and optionally name of each character to stdout.

utf8dump interpretes stdin as a UTF-8 stream and dumps the codepoint and optionally name of each character to stdout.

Signing multiple keys using gnupg is a lot of work, especially if you do not want to sign all uids of a specific key. This script is intended to automate all the repetitive stuff (entering the passphrase multiple times, downloading keys, selecting uids, removing unconfirmed signatures, exporting signatures and sending them to the signees, ...).


My infamous countdown script which I use at the Linuxwochenende to remind the lecturers that time is short.


A simple Perl script to search backwards through a subversion repository for a given pattern.

zsh dot files

my dot files for the zsh.


A simple link checker written in perl.

A simple script to call ls on a file and all its ancestor directories. Useful if you get "permission denied" errors on files within deeply nested directory structures and want to know where the permissions are too tight.
rsync-snapshot - make snapshots using rsync and cp --link
This is an idea I first described in Sept. 2002 on the luga-act mailinglist (members only - password required): First create a copy of the last snapshot as link farm, then use rsync to change only the files which have changed. If the disk fills up, simply remove the oldest tree.

Lots of people seem to have had the same idea independently. You can find similar scripts all over the net and even in print. Rsync has since aquired the new option --link-dest, which promise to do the same.

ftcp - fault tolerant copy
copy one file to another, ignoring any errors. This is useful for copying files from defective media.
Small collection of perl scripts to ping many hosts and write statistics to a database.

xssd allows execution of commands as another user similar to sudo or setuid bits. Unlike sudo, however, it is intended to be extremely simple and therefore easy to verify for correctness. Unlike setuid bits, it logs each invocation to syslog, filters environment variables and is more flexible in granting access to different users.


A perl script to get a named source (e.g, a function or procedure) from an oracle schema.

A perl script to remove unused files from a temp directory. Redhat's tmpwatch acted rather strangely, and an older shell script I had, had a rare but disastrous (and not easily fixed) bug, so I decided to write one from scratch (I am sure it could be shorter, though).
zbuffer - A little demo showing the zbuffer algorithm
ant - Assortion of Needful Things
A small library with more or less useful functions.
A primitive http commandline tool. It can send GET, HEAD, and PUT requests. For GET requests, the header of the result can be suppressed. Proxies and basic authentication are supported.
A few perl scripts to check whether your installed packages are actually used, uptodate, etc.
An aborted attempt to generate meaningful statistics from http access logs. Focus was on accumulated statistics for subrtrees and on extracting the paths that users follow through the site.
Roxen Modules
Module(s) I wrote for the Roxen web server.
Binary diff.
Yet another simple benchmark program. This one reads a disk sequentially and prints the timings for each 1MB chunk. With Gnuplot you can then create performance graphs of your disks.
Print binary representations of IEEE numbers
A simple UDP benchmark program.
A simplistic CPU und disk benchmark program.
A little hack to create buttons with text. This button for example was created with
ppmbutton -f '*-courier-*-r-*-24-*' ppmbutton | ppmtogif > ppmbutton.gif
Despite the name it does not use the ppm library, but uses its own method to write ppm (I do like the ppm programs, but not the library).

Version 2.0 can render truetype fonts in addition to X11 fonts. An X server is needed only to get X11 font bitmaps, all other processing is done by the program itself. This should improve both the output quality and the speed of the program. The truetype support is still somewhat patchy: Only a few truetype formats are supported, kerning and hinting information is ignored.

A program to schedule students into groups for the "Systemprogrammierung" practical at the TU Wien. Implements the flood algorithm described in Gunter Dueck, Tobias Scheuer and Hans-Martin Wallmeier, "Toleranzschwelle und Sintflut: neue Ideen zur Optimierung", Spektrum der Wissenschaft 3/1993 pp. 42-51. .

Ralf Schlatterbeck has put a lot of work into improving this program, I don't really know how much of the code is still mine :-).

The examples directory in this distribution is missing, because it contained real student data.

Some of my GNUmakefiles include a file named GNUmakerules. Here is a sample.