PNG support for GNU barcode

This patch adds a PNG output backend to the GNU barcode library and front-end.

The patch relies on the 0.98 codebase and requires the autoconf tool.

To install:

 tar xfz barcode-0.98.tar.gz
 cd barcode-0.98/
 patch -p1 < /path/to/barcode-0.98-png.diff
then follow the instructions in the INSTALL file.

You must have libgd installed on your system for PNG output to be enabled.

To produce a PNG file with the barcode front-end, use the new -N option.

Note: the font used to print the ASCII form of the code is currently hardcoded in png.c (look for char *font =). Please adjust it to match an existing TTF font on your system. (Yes, it will become a parameter sooner or later.)

Japanese language learning tools

I've written some simple learning tools for the Japanese language. They are in their own page. At the moment, there's only one available - a Java midlet for testing your knowledge of hiragana and katakana. Should work on all J2ME-enabled cell phones and/or PDAs.

Passthrough MD5/SHA1 calculation of uploaded files for PHP

This patch enables "on the fly" MD5/SHA1 digest calculation of a file uploaded via the HTTP POST method. Since it is not uncommon for applications to require some digest of a freshly uploaded file, doing the math directly in the buffer where the file is being read can save some time.

Digest calculation is triggered by setting the special input fields COMPUTE_MD5 and/or COMPUTE_SHA1 to a non-zero value:

<input type="hidden" name="COMPUTE_SHA1" value="1">

(note that these assignments must precede the <input type="file" name=...> field, as in the MAX_FILE_SIZE case.)

The result is found in the special variables $_FILES[userfile]["md5"] and $_FILES[userfile]["sha1"]. These variables are only defined upon request of the corresponding digest.

Download the patch against PHP 4.3.10.

the Simple Cyrus Administration Tool (v1.1.1, 9 Apr 2003)

A shell script to handle user creation, deletion, and password changing.
The administrative password (i.e. the password for the user who can administer the Cyrus system - see the "admins:" parameter in your imapd.conf) can be hardcoded in the script (possibly posing some security threat) or asked interactively (just comment out the CYRUS_PASSWD= line).

If you're using Postfix, the script can also be used to add aliases to a Cyrus user. The recommended way to configure Postfix for this is to create an additional aliases file exclusively dedicated to Cyrus users (say /etc/postfix/aliases2), to be appended to the alias_maps and alias_database lists in your
To disable alias handling functions, set ENABLE_ALIASES=0.

The configuration can be customized by editing the parameters at the top of the script.

NEW in version 1.1: importing a list of users from a text file is now possible.
Each line of the file must have the form
username password alias
Both the "password" and "alias" fields are optional.
If the username alone appears on a line, it will be given a default password consisting of the username itself, and no alias.
To specify an alias for a user, the password field must be explicitly included.

Any number of blanks can appear between the fields.
Empty lines are ignored.

Download the script.


A minimal Linux kernel patch giving a visual confirmation (the three keyboard LEDs are lit) that shutdown has completed, and it is safe to turn off the computer. Useful if you have a pre-ATX mainboard and no monitor connected.
Works with the 2.2 series; never tried with 2.4 or higher (bought an ATX mainboard at last ;-).

Download the patch, then apply with

cd /usr/src
patch -p0 < leds-patch.diff


Yet another thumbnail generator suitable for web photo galleries and the like. Requires djpeg, cjpeg and pnmscale.
Only JPEG photos are supported at the moment.

Download the script.