It occurred to me recently while searching the web yet again for a particular error message for a particular bit of Free Software that I was using that I use an awful lot of Free Software an awful lot of the time. (That's Free as in Freedom, not just as in Beer.) I've written a few bits of Free Software, too. This is a deliberate choice: I believe that software can benefit the world in ways unique to how it is made and used, and that software provides the greatest benefit when it is unfettered by proprietary constraints and remains open for anyone to fix or improve.
I observe that I benefit most from Free Software when its idiosyncrasies are noted and documented, and when I can find that documentation. Also, I note that sometimes example configurations are more useful than reams of technical verbiage. So, in the spirit of Jo's devlog, I present the ongoing and irregularly updated catalog of Free Software that I wrote or that I use, in the hopes that the archive will later benefit someone (me, probably).
Software I wrote (or am hoping to write)
- With Rob Flickenger, NoCatAuth, a captive portal system written in Perl, and its successor, NoCatSplash, which is written in C.
- With Jo's support, I wrote Geo::Coder::US, a free US address geocoder based on the US Census Bureau's TIGER/Line dataset. We host a free (for non-commercial use) lookup service at geocoder.us.
- A bunch of geo- / locative / mapping / GIS hacks. A lot of them live in the Mapping Hacks projects directory, or in the Locative US places directory. The online map setup I am happiest with include (usually with configuration details lurking in the same directories):
- the Locative US Earth browser, using VMap0 and satellite composites dynamically delivered from NASA's JPL over OGC WMS.
- an interactive map of the Peloponnesian War.
- an interactive map of Sonoma County, made with Rich Gibson. Highlights include Bodega Harbor, and Rich's house on Florence Avenue in Sebastopol. The map uses my TIGER/Line-to-PostGIS importer and DOQQs from the state of California.
- the London Free Map demo, with Jo Walsh. Still under heavy revision.
- The NoCat Maps elevation profiler, with Rich Gibson. This is the one that started our fruitful geo collaboration. Sadly, code is not available at the moment, because it was a total hack never intended for distribution. Contact me if you're interested in the idea -- Rich and I keep talking about reimplementing it.
- I built a free US ZIP code database for Civic Space Labs. Okay, that's not code, but it is potentially useful.
- I maintain a bunch of Perl modules on the CPAN, some of them written with Jo.
- Jo and Saul and I have a couple of vaguely UO-related loose change projects, like a perl script for doing cellstumbling (linking GSM cell ID with lat/long from a GPS), or shell scripts that turn wiki pages into 2-up and 4-up PDFs for printing, or a client/server combo that takes SMS messages from an RS232-connected GSM phone and pipes them over the Internet to a database. Someday (when/if these projects mature) I will post this code; if I don't, bug me.
- You can rummage around my hacks directory.
Software I had to configure at one point (if not repeatedly)
Linux, GNU, etc.
I'm not going to catalog this stuff in general because a million details are to be found on the 'Net, and it mostly just works. I will however catalog specific services or apps that I use, I think. I tend to run Fedora Core, but I'm happy with Debian (thanks to Jo). I must confess Ubuntu looks shiny and I'm curious to try it.
- Shell. You would think anyone obsessive enough to create
this archive would at least have a really interesting .bashrc, but actually it isn't so. I constantly have to
look up the fact that bash sources your .bash_profile when starting a login shell, and
.bashrcwhen starting an interactive non-login shell.
- Secure shell. I use OpenSSH daily. OpenSSH
encrypts CVS and rsync and will even let you tar up whole directories and pipe
the tar into an ssh connection to be untar'd in a shell on the other side.
ForwardAgentis your friend, as are the SOCKS proxy (
ssh -D, super useful on public Wi-Fi) and the port forwarding (
ssh -L, for use with SMTP, POP3, etc). Somewhere I once had a Makefile to automate distributing OpenSSH authorized_keys across the different systems I have accounts on.
- Text editor. I use vim for basically everything. I wrote significant portions
of Mapping Hacks using vim (and I think I wasn't the only one). I'm not
religious about it, but I am pretty used to it. Here's my .vimrc, which keeps my tab stops at 4 and makes my
backspace and arrow keys work in insert mode on systems with strange termcaps.
It's probably the first or second thing I copy up to any new system. I would
like to try adding modes and whatnot to it. In the meantime, my favorite
feature in vim is
- Scripts. I've written a bunch of random shell scripts. Here's a cross-section of my ~/bin directory across a few systems:
- buildpkg: A script for building Slackware packages from source. Man, I haven't used this in forever.
- burn-audio: Burn a directory of .WAV files to an audio CD.
- burn-data: Burn a directory of files to an ISO9660 CD with Joliet long filenames.
- burn-mix: Take a list of MP3 and/or OGG files, turn them into WAVs, normalize their levels, and then burn an audio CD.
- cvs2cl.pl: CVS-to-ChangeLog. I didn't write this, but it's awful handy for whipping up a ChangeLog from CVS commit histories.
- find-bracket.pl: A script I wrote to locate the missing right bracket in long-winded perl scripts. Thankfully I haven't needed this recently, either.
- mp32wav: Convert an MP3 to a WAV file suitable for burning to an audio CD.
- perlver: Shorthand for "perl -MModule -e 'print $Module::VERSION'". I could probably do this with a shell alias.
- postfacto: Edit a Blosxom entry, and then restore its original timestamp on disk. Handy for fixing typos without disturbing the order of blog entries.
- X11. When I run
startx, my .xinitrc fires up my SSH agent, prompts me for my SSH key passphrase via a GTk+ text input, turns off the system beep, loads my keyboard map (if I have one this week), runs the screensaver, and sets the background image. There must be an easier way to do all this. Also, here's my .Xdefaults, which I keep around mostly just to style xterms. (startx in Fedora loads my
.Xdefaultsfor me; gdm on Debian doesn't. Anyone know why?)
- Window manager. I run Fluxbox as my window manager with the BlueFlux theme. FluxBox is lightweight, loads quickly, and has a non-irritating task bar. Here's my ~/.fluxbox/menu, which reflects the desktop apps I use most: rxvt / xterm (terminal), firefox (web browser), gaim (IM client), kphone (VoIP soft phone), gimp (image editing), gqview (image browser), xmms (audio playback and streaming), alsamixer (audio mixer), xfontsel (font selection), xcalc (calculator), and oowriter / oocalc (OpenOffice). Everything else I do in a terminal.
- Focus model. I like my focus sloppy. You can imagine I find it mildly chafing when I'm obliged to use Windows or OS X, or when Jo changes my focus model and forgets to change it back.
- I am only an egg. I wish it was easier to make fonts bigger or smaller in rxvt (or xterm). I'm still looking for a terminal font that looks good in xterm at a size I like. Also, is it me or is the GNOME desktop getting sexier finally? Will it make my CRT look fat?
- Read. Of course I run Firefox, with the Adobe SVG plugin and the Macromedia Flash plugin. Here are the relevant bits from my ~/.mozilla/firefox directory (not because they're interesting, but so I can find them later).
- Write. For lack of anything more compelling, I use Blosxom to publish my weblog.
- I hacked my own rendition of Pascal Deschenes's randomizer plugin for the blog subtitle, and my latest bookmarks are included by means of a combination of Nelson Minar's file plugin and a short perl script that runs Net::Delicious from a cron job.
- I finally caved and added the seemore plugin to make the Mapping Hacks front page a little more readable. I might add it to iconocla.st as well.
- In a similar fashion, there's a poor man's RSS aggregator that populates the link sidebar on the Mapping Hacks site via cron. I could probably replace the previous script with this one as well, if I was suitably motivated.
- I also spent way too much time writing a really dubious archive generator that runs once a month, rather than have that part of the sidebar be dynamically generated by a plugin on every page hit.
- Finally, I have a dodgy Makefile I use to turn my Blosxom templates into something Apache can use as a header and footer in server-parsed HTML files. I guess the great thing about Blosxom in the end is that someone like me can hack all these bits on to it without too much pain and especially without having to get married to a Blogging Application like MT or something.
- Photo galleries. I use a modified version of Meng Weng Wong's pcdindex tools to generate my online photo galleries. You can get my version as well -- really the only difference is that I renamed some of the scripts for user-friendliness. It's not a brilliant solution for making photo galleries -- I'm not sure if Meng even uses it anymore -- but it has the advantage that Apache doesn't get bogged down rendering galleries and I don't have to think too hard about it.
- User agent. I use mutt to read my email on the
server. Here's my .muttrc, which I cribbed from Gene Boggs when we worked together at O'Reilly, so
it has a lot of random stuff in it. The most interesting bit in it the macro
set up for the "S" and "H" keys to feed spam and non-spam email to SpamAssassin
to train the Bayesian filter. (The actual SA database rebuild happens later in
a cron job.) I also use the heck out of fcc-save-hook
mutt.hooks, but I'm not giving out a copy of that. I'd like to figure out how to get it to sort folders by thread automatically.
- Transfer agent. I use Postfix as an MTA. Here's an excerpt of the customized bits of my /etc/postfix/main.cf. Haven't done much to it, really,
besides get virtual maps working right. I keep a Makefile in
/etc/postfixfor use in regenerating alias maps and so on. Not much to say about that except it took me about 45 minutes to migrate to Postfix from Sendmail.
- Delivery agent. I use Procmail to filter everything through SpamAssassin before local delivery, and throw away anything that looks remotely like spam. Here's my /etc/procmailrc. DSPAM is commented out just 'cause I've never been able to build a working package of it on Fedora Core.
- POP3 / IMAP. I just started using Dovecot as a POP3/IMAP server, because it's easy to configure and because I'm not converting my entire mail spool to Maildir just to suit cyrus-imapd. I used to get innumerable headaches from users with shell accounts wanting access to their mail via POP3, but those problems are solved now. My dovecot.conf is basically unmodified, except that I left pop3s and imaps on and turned everything else off.
- Filtering. Finally, I (sometimes) use a custom perl script to filter my own mail via
.forwardwhen it comes in.
Other Network Services
- DNS. I run BIND 9 in a chroot jail and use a generic zone file for most domains, as suggested in O'Reilly's BIND Cookbook, so that adding entries to my named.conf is vastly simplified. I use a Makefile to trigger a script to generate a named.conf for the secondary DNS servers, which I then have to scp over. There has to be a better way to do that! I've also been impresed by PowerDNS and its MySQL bindings, but I don't use it regularly.
- HTTP. Apache 2 with mod_perl. Fortunately, Apache is exceptionally well documented.
- Databases. Most recently, using PostgreSQL for the PostGIS spatial extensions and Redland for RDF storage. I would use MySQL again. I like SQLite and Berkeley DB for their compactness, but, for all that, their binary files don't port well across systems.
- Portsentry. Most script kiddie assaults start with a port scan, to see what resources and vulnerabilities your system has. Portsentry listens for errant connection attempts on unused ports, and calls iptables to stop port scans cold at the firewall. It's as if a prowler peeked into the second or third window in a house, only to find the house has vanished utterly. The server that hosts this web page gets port scanned about a dozen times every day. I can't say enough good things about Portsentry. Occasionally someone trips it by accident (forgetting to switch PuTTY off telnet, or something) and I have to reset it by hand, but if I wait long enough, the cron job will do it for me.
- Traffic shaping. WonderShaper is your friend. By
prioritizing TCP ACK packets, as well as packets with the Minimize-Delay bit
set (e.g. SSH), and by allowing you to de-prioritize stuff like BitTorrent,
WonderShaper makes asymmetric network uplinks behave responsively, even during
large uploads or downloads. I don't know why every ADSL router setup doesn't
include something like this. I also use it on colo servers to keep them under
their bandwidth cap. Here's a hacked version of
WonderShaper that uses the lightweight HTB queuing algorithm. (I didn't
write it, but I forget where it comes from.) Drop it into your
- DHCP. Why bother with ISC software when you don't have to? I've discovered a fondness for dnsmasq, which acts as both a lightweight DHCP server and a caching DNS proxy. Here's a working dnsmasq.conf.
- File sharing. I use Samba for sharing files even between
Linux machines, because I find it more stable and reliable than NFS. Here's a
working smb.conf. Don't forget to add users with
smbpasswdif you're serving private shares and expect other people to be able to log in.
- I prefer APT over Yum for package maintenance on Fedora Core. Here's my horror story.
- I maintain the Mapping Hacks GIS
RPM repository. Although I didn't write the vast majority of that code, I
do have to get my hands dirty packaging it. I started by adding myself to the
wheelgroup, and recursively made the whole contents of
/usr/src/redhatgroup-writable by wheel, with all the directories set-group-ID. This allows me to not have to be root when compiling new packages - and a good thing, too! One bungled
make installand you'll be scraping bits out of your
/usrpartition forever. Forget it! Build RPMs as a normal user, then install them as root. Here's a directory full
of random RPM spec files, only some of which actually
- Also, here's the magic incantation from ~/.rpmrc that causes all your packages to be built for i686 (or whatever) instead of i386.
- One of these days I'm going to have to get into Debian packaging. *sigh*
When In Rome...
- On the infrequent occasions that I'm compelled to use Windows, I install (if I possibly can) the following Free Software apps: Firefox, Gaim, and PuTTY. Once I've got them installed, I could almost ignore the underlying OS, if it weren't for the bloody focus model.