Helpful Programs

Here are some helpful programs I've written over time. Hope they can help you too. The binaries are for Linux/x86/libc6.

Read each program's README files for more information. Feel free to distribute them and use them how you please, so long as you don't make any money off of them and don't remove the copyright text.

WebAudio Lissajous generator
Lissajous figure generation using WebAudio. Hook an X-Y oscilloscope up to your L-R headphone output.
TLA+/PlusCal Syntax file for JOE’s Own Editor.
PEGs for SWI-Prolog.
x-unicode (Chrome/Firefox)
Browser extension to replaces x-system digraphs with their Unicode counterparts.
lt linker tricks
Tool for manipulating object files in interesting and useful ways.
JSPL (source)
Prolog interpreter written in JavaScript.
Wrapper for urxvt which uses its printscreen capability to periodically save text “screenshots” in ~/.hist-term/pid/time, where pid is the PID of the urxvt process, and time is seconds since epoch. time=latest is a symlink to the latest screencap. The screen is not captured if it has not changed from the latest.
SNAM Quick User Interface for Reticle Reduction Entry of Location. See the link for more details.
OCaml script to convert a standard Apache log into a sequence of PostgreSQL inserts. Handles proper deescaping/escaping. See source for table schema.
Perspective projections functions for Octave/Matlab
find_projection finds the perspective projection matrix necessary to project a set of points to given new locations. Output is a matrix which may be passed to project to project an individual point, or to project_image, which projects an image represented by a matrix (arguments similar to interp2).
A rapid XML templating language. See the link for more details.
Tinker (package)
A "reverse-engineering" game for Android based on GFingerPoken. Tap to roll balls through the black box, watch where they come out, and place mirrors to make your model match the black box. Not polished yet but playable!
OCaml Reactive Toolkit
A functional-reactive GUI toolkit for OCaml. Development paused while the computing industry reinvents itself as cloud-based services. Quite usable however. Shares ideas with PLT Scheme/Racket's FrTime and Flapjax.
Small shell script to convert a PostScript (or PDF) file to an equivalent PostScript file containing only TIFF G4 bitmaps. Perfect for old PostScript printers that just die when given big PostScript files. Usage: ps2tiffps | lp. Requires ghostscript and libtiff-tools.
Small AWK script to compute entropy of a sequence of symbols. Equivalent (probably faster) OCaml version here (binary).
bhop (binary)
Retransmits broadcast UDP data packets to a unicast address. Requires root privileges. Useful for games like Starcraft.
syx2mid (binary)
Converts a .syx (SYSEX) file to a .mid (MIDI) file. Usage: syx2mid < input.syx > output.mid. Inserts a 1/2-second delay between successive messages to prevent buffer overruns on older hardware. Pipe into aplaymidi for great justice.
a440 (binary)
Plays A440 (or some other pitch) through your speakers. Requires PortAudio.
EXIF copier
"exif-copy from.jpg to.jpg" copies EXIF data from from.jpg to to.jpg. Requires exiv2.
Flickr Reuploader
Small shell script to automate mass re-uploading of pictures to Flickr. Useful if you've ever uploaded a bunch of low-resolution pictures and want to replace them en masse with higher-resolution ones. Requires a properly configured installation of the flickcurl command-line utility, as well as some possible tweaking of the basetitle function for your naming scheme. Usage: run in your picture directory.
Mathinator (source)
O'Caml program to convert "human-readable" math expressions into TeX. CGI interface included to convert TeX to PNG, EPS, PDF, etc.
Timeout for "Thinklight" on IBM Thinkpads. When the Thinklight is enabled manually (Fn+PgUp), this program will cause it to shut off after five seconds of keyboard inactivity, and turn back on when any key is pressed. Must be run as root (needs permission to read /dev/input/event0 and to write /proc/acpi/ibm/light).
dtypes for JOE
O'Caml -dtypes (.annot file) support for the JOE editor. Unruly combination of JOE macros and awk.
mini-remote (binary)
Cheesy program which echoes events from the Mac Mini remote control to stdout. Requires Linux hiddev interface and read permissions for /dev/usb/hiddev0 (or wherever the Mini remote is on your system (UPDATE: the /dev/usb/ directory seems to have disappeared in recent 2.6 kernels. Help?)). Useful in cheesy shell scripts such as...
...this one! Uses events from mini-remote to control xmms2 and the ALSA mixer. Can probably be adapted to work with other media players (or just about anything really). xmms2 doesn't seem to support play/pause toggling so the "menu" key acts as the pause button for now.
Small shell script to convert PostScript files to Encapsulated PostScript by using ps2epsi and removing the thumbnail it attaches.
Simple shell script for Linux which scans /var/log/auth.log for hosts making failed login attempts (either bad usernames or bad passwords for root/nobody/guest) and adds them to the file /etc/hosts.deny.ssh. To install, add the line "sshd: /etc/hosts.deny.ssh" to /etc/hosts.deny and place the ban_h4x0rz script in /etc/cron.daily/.
Pie menus for Tkinter, implemented as a drop-in replacement for Tkinter Menus.
MIDI Recorder (binary)
Simple command-line program to record MIDI files using the ALSA sequencer. NOTE: I wrote this a long time ago; it looks like the ALSA utils come with arecordmidi now. So you should probably use that instead.
Explode that web page!
HTMLized Markov chain goodness.
Other stuff (README)
Some other libraries I wrote at one time but forgot about. Maybe they will be useful to you.
PostScript stuff
Dabblings in PostScript. Maybe they will be educational, or entertaining.

That's all for now.

raise Exit