Tuesday, October 16, 2007

University::UMassAmherst: Programmatic Access to SPIRE

University::UMassAmherst is a perl module that provides programmatic access to SPIRE's course catalog (SPIRE is UMass Amherst's course scheduling website).

This is a rough draft, and it shows - there's not much documentation and there still may be a few bugs (don't even ask for tests yet). However, this should be very handy for people who need to aggregate course data because I believe this is the first of its kind (for UMass, atleast). Future releases (which I'm definitely planning on) will include better documentation, build tests, and caching to reduce bandwidth.

Enjoy!

Download

btlock: security through bluetooth

btlock is a simple perl script for locking the gnome screensaver when a user is not in close proximity to their computer. This is done by periodically pinging a user specified bluetooth device address (preferably something that the user is always carrying, like a cell phone) using l2ping. If the device is available (returns echo requests), btlock disables the screensaver lock. If not, btlock enables the lock. This is easily done using gnome's gconf tool.


If it is not obvious, this script was designed for the GNOME environment on Linux.

To set up:

  • make btlock.pl an executable (chmod a+x btlock.pl)
  • put btlock.pl in a binary folder (I went for /usr/local/bin)
  • add a crontab entry for the root user (l2ping requires root)

Arguments for btlock are:

btlock.pl (linux user) (device address) [ping timeout=10]

Someday this noble program will be ported to windows.

Download

hello, world!

Hi there, this is the blog of Tom Petr. I decided to start this blog as a sort of "code portfolio" for myself... Hopefully I won't be too lazy to post on it :-)