Installing BackupPC on OpenWRT
I wanted to have a backup server for my church that would automatically take backups when computers came on to our new wireless network. BackupPC immediately sprang to mind, but it only runs on Linux. How could I get a Linux server into the church in a very low cost way? Answer: An Asus wireless [...]
Hacker Alarm Clock
I was at the ELCA Central States Synod Candidacy Retreat with my wife last night, and we realized far too late that we lacked a travel alarm clock. Also lacking an internet connection, it was impossible to download an alarm clock program from the Ubuntu apt repositories. Instead, I quickly coded up this Hacker Alarm [...]
Template Toolkit: how to generate static HTML on any path
My company generates our website using Template Toolkit‘s ttree tool. We want our site to be built with absolute paths in the HTML, so we need to be able to accomodate that with file:// URLs when we test it. We use code like this: The script to invoke ttree in our testing environment: #!/bin/bash cd [...]
The Value of Community, or Why I Love Perl
I’ve been asked a number of times recently why I chose to use Perl to develop SAGrader, my company’s flagship essay grading product. I’ll be the first to admit that Perl tends to permit bad (unreadable, unmaintainable, overly terse) code in more ways then, say, Java. I think that those problems are mitigated by keeping [...]
Using next_successor with Graph::Traversal
I recently needed to do a graph traversal using the excellent perl Graph library, but I needed to determine the order for visiting new nodes in the fringe myself. Graph::Traversal provides a next_successor attribute which takes a code ref so that you can specify this behavior yourself. Unfortunately, in version 0.80 that feature isn’t well [...]
Dynamic CSS/JS/HTML in Template Toolkit wrappers
I’ve been asked about this a few times on #tt, so I thought I’d provide it for future Googlers. If you’re looking to optionally include certain files in a Template Toolkit wrapper, it’s very easy. You just provide the file names as a parameter to the WRAPPER call. First, the wrapper file itself, wrapper.tt: <!DOCTYPE [...]
Debugging long-running perl programs in Debian
One of the slicker ways I’ve seen of trying to figure out what Perl is doing in a long-running process is defining a signal handler, like so: use Carp (); $SIG{‘USR2′} = sub { Carp::confess(“Caught SIGUSR2: Dumping stacktrace and dieing:”); }; It works great, dumping the current stacktrace to STDERR. But if you’re stuck in [...]
My first CPAN acknowledgement
It’s a small thing, but I’m listed in the acknowledgements for Test::Class, an excellent little xUnit-with-a-decisively-perl-twist module that we use at work. A star is born?