Miscellaneous

Random programs that are unsorted, broken or just forgotten.

delay.tar.gz 11 May 2004 2.5k
tunnel.c 11 May 2004 9.6k
myapp.tar.gz 11 May 2004 3.3k
ptytelnet.c 11 May 2004 16.5k
xkeycaps-keycapsonly.diff 11 May 2004 5.0k
njsmodule.tar.gz 11 May 2004 17.1k
png-sample.c 11 May 2004 2.2k
progressbar.3.html 11 May 2004 4.0k
roman.py 11 May 2004 2.0k
uqwarnd-1.0.tar.gz 11 May 2004 2.4k
pty_redir-0.1.tar.gz 11 May 2004 8.2k
c2u.pl 11 May 2004 3.5k
png-sample-rgb.c 11 May 2004 1.4k
npg.tar.gz 11 May 2004 1.3k
imgcalc.tar.gz 11 May 2004 9.8k
progressbar.tar.gz 11 May 2004 4.5k
ptymodem.tar.gz 11 May 2004 6.6k
ssl-cs.c 11 May 2004 5.5k

Description

delay - 30 second delay
This program copies data between two file descriptors, but inserts a 30 second delay queue in between. The reasoning behind this is that you can then set up a packet forwarding wireless router with a 30 second delay, carry internet traffic and still avoid needing an Australian carrier licence (see s35(3) Telecommunications Act 1997 (Cth)).
imgcalc - image file function evaluator
I wrote this program for Rotor so that he could efficiently compute linear functions over a vector of images (such as add, subtract, average). You express what you want in a tiny lambda-calculus-like language, comlpete with let-expressions and it walks through all the congruent input files to generate a result. He tells me that it was included in some freeware image processing s uite. It is unfinished because I was in the middle of adding support for function libraries, an optimiser, and a way to generate C code so that a parallelizing C compiler can make things even faster.
MyApp
A sample/template X11 application. All you need to do is fill in the Initialize(), Exposed() and maybe the Resize() callbacks. I use this occasionally instead of Xaw/Template*.
njsmodule - NJS JavaScript inside Python
This is a module for Python 2.1 that allows you to access the NJS JavaScript library via the public NJS API. It is quite old now. Here is an example of it running:
Python 2.1 (#1, Jun 17 2001, 17:19:51) 
Type "copyright", "credits" or "license" for more information.
>>> import njs
>>> i = njs.create_interp()
>>> i.eval('System.stdout.writeln("Hello, world!");')
Hello, world!
<njs.true>
>>> 
npg - number plate game solver
Scans through a system dictionary looking for the longest word that contains the given letters in their given order. Used to cheat assist me on the phone-in NPG game that Spencer Howson used to run on ABC Brisbane radio.
PNG sample code
Some sample programs to play with the PNG library
progressbar - console progress bar library
A generalisation of the progress meters found in OpenBSD's ftp and scp programs. See its manpage for a detailed overview.
pty tunnel tools
At one stage I was very interested in wrapping ptys so that I could set up PPP tunnels between computers.
ssl-cs - example SSL client/server program
An example/template program in C used to investigate SSL/TLS.
uqwarnd - UQ modem bank listener
Listens for disconnection messages from the UQ modem bank (which are sent to TCP port 701 of PPP and SLIP clients) and redirects them to syslog.
xkeycaps patch
Patches jwz's xkeycaps so that extraneous buttons and panels are removed. This makes it kind of useful as a keyboard input for PDAs running X but with no keyboard. See also: Ken Perlin's QuickWriting< /a>, a Graffiti substitute, and the FITALY layout (as opposed to QWERTY).
c2u - context to unified converter
A handy perl script that converts context diffs (diff -c) into unified diffs (diff -u). I used it when people were sending me large context diffs, but I find it easier to read unified ones.
roman.py - roman numerals
Python program that converts decimal integers to and from roman numerals. This was written one afternoon as a response to a challenge. Later on I found some rules on the construction of roman numerals. It is interesting to compare my Python program with an independently developed Perl version.

Licence

Different licences apply to different files. Please see the individual files for more information.