I’m in the process of trying to make available code I’ve written and related technical material like useful configuration files that might be of use to others. All code is under the BSD3 license (which I’ll get around to adding to everything at some point), so you can do whatever you want with it. Descriptions and links for browsing or download follow:
Some (mostly standalone) Java utility classes that I use frequently. For more information, see here.
The beginnings of a library for working with RDF in Haskell.
For more information, visit the project page.
A program and an associated library supporting bulk file and directory name normalization.
For more information, visit the project page.
A module providing some basic linear algebra operations.
The functions cover the standard basic operations on vectors and matrices. If you are looking for an efficient and complete linear algebra module, this isn’t it. This module is intended just as a simple (no install, no dependencies) way of double-checking some of the more tedious linear algebra stuff as I worked my way through a linear algebra text.
Split a large text file or text stream into 2 files. This is functionally equivalent to doing 2 passes over a file with the standard head and tail Unix programs but does it in one pass. It is written in pure C99 and should be portable. I wrote this to get some experience with C and to use with some processing of huge text files (tens of millions of lines) I was doing.
As compared to the standard GNU split program, which allows you to split a file into multiple same-sized pieces, this program allows you to split a file into just 2 pieces, but the pieces can be any size. This isn’t possible using GNU split unless the size of the first file is at least half the size of the total file.
A configurable script that reads login information, using `last`, and verifies that all logins came from expected IP addresses. If there was a login from an unknown IP address, it emails the admin with information about the unknown login.
I use this to notify myself when my home dynamic IP address changes (which is quite infrequent). The first time I ssh into my server, it sends me an email with my new address. I run it via cron every half hour.
portageconfedit.sh is a script that allows users of Gentoo Linux to allow non-root users to edit certain very commonly edited configuration files (/etc/portage/package.keywords and friends) in a reasonably secure manner, using sudo and sudoedit. Look inside it or save it and run ./portageconfedit.sh --help for more details.
The following is what I use for shell initialization. It provides a ton of aliases and convenience functions, and provides a way for user-defined additions. I still need to clean things up a bit more when I have time, but I’m putting it up as now because it might be of use to others already.
So what does it provide?
If you have keychain installed and define SSH_KEYFILE to point to your OpenSSH pub key file, then keychain will be started automatically if not already running. If you additionally define SSH_KEY_APPS as a space-delimited list of program names like "ssh scp rsync darcs hg cvs", then aliases will automatically be defined for each of these apps so that when you invoke the app, your keyfile is added to ssh-agent if not already added and not expired yet. You can set a default timeout for each username@hostname combination you want, since you might want your laptop key to expire much sooner than your desktop key, or root user to expire much quicker than a non-root user. This saves you from having to remember to manually call ssh-add to register your key, and makes using ssh pub key authentication as convenient as it can be without doing something silly like using no passphrase on your key.
The keychain app also starts a gpg-agent process, which I don’t have any configuration options for yet.
See the documentation inside the script for other stuff that it provides.
This site is valid XHTML+RDFa, CSS.