-rwxr-xr-x 2 perette perette 20660 Oct 2 2006 battery-sleep* -rw-r--r-- 1 perette perette 3559 Oct 2 2006 battery-sleep.c PPC & source code to the utility. Monitors power status (plugged in or not) and starts/stops processes by sending SIGSTOP and SIGCONT. -rw-r--r-- 2 perette perette 437 Oct 2 2006 edu.stanford.folding.plist File to start the Folding@Home command-line client running under battery-sleep. Goes in your Library/LaunchAgents directory. Requires tweaking filenames to wherever you've installed things. -rwxr--r-- 1 perette perette 12106 Oct 25 16:55 diary* The script that generates my statically-published journal. Late 2007 revision, which uses my m4 table of contents module to handle headers, allowing integration with index generation. -rwxr--r-- 1 perette perette 523 Apr 18 2006 pbloc* Like 'locate', but combines output with Spotlight data so for the home directory, at least, the list is always up to date. -rwxr--r-- 1 perette perette 2613 May 2 22:53 pull-backups* -rwxr--r-- 1 perette perette 736 May 2 22:53 get-backup* -rwxr--r-- 1 perette perette 5081 Aug 1 2006 netbackup* -rwxr-xr-x 2 perette perette 6179 Sep 27 2006 resourcefork* -rwxr--r-- 1 perette perette 8166 Jan 22 22:21 tls* Backup utilities & support code. My backup strategy is: - My workstation pushes a backup to the house server nightly. - The off-site archiving backup servers (2) pull backups from the house server later in the night. The reason for the opposing directions (push vs pull), is that using a singular direction would allow hacking one account to provide access to all downstream backups because of ssh peers using authorized keys. This way, the house server is a whore but you can't just ssh from my workstation to the house server to the backup servers, or vice versa. So: - Hacking the workstation can take out the house server. - Hacking either off-site backup servers can take out the house server and whichever backup server. - Hacking the house server only takes that unit out. - At most, one archiving backup server can be taken out without hacking a different system. pull-backups runs on the archiving backup server, called from cron. It looks in ~/Backups for directories named user@host, then figures out the next backup sequence number and calls user@host/get-backup with some parameters that tell it where to put a backup. get-backup actually does the backup, so it can handle variations among systems, such as custom exclusions or OS X having resource forks that require exposure and removal versus Linux systems that don't. netbackup runs on the workstation and pushes a backup to the house server. Be sure to change the hostnames in the code. resourcefork is a utility used by netbackup and pull-backups to expose, hide, locate, and remove resource forks. It can also be used independently; see pull-backups -? for more information. tls (time ls) works with the remote servers (specified in-line in the code) on which backups are stored to show available versions of a file. Usage: tls [-i] . By default, remote versions are just listed; with -i (interactive mode) tls lists the files and then prompts for a command. The list includes only the earliest date found -- subsequent unchanged backups are not listed, nor are similarly dated identical files on other backup servers listed. Commands are: diff - with one parameter, compares a dated version with local, otherwise compares two dated versions. ls - redisplays list of files get - gets a version to a local file, or overwrites the local file if no destination is specified. vi or view - opens a dated version for viewing. Changes are lost. Caveats: tls expects files to be in the same place relative to your home directory in the backup heirarchy used by pull-backups. Revision dates are extracted from the backup directory structure date, not actual recorded file dates. Remote server names are printed before ssh and scp invokations, as it is expected that you don't have ssh peering set up. -r-xr--r-- 1 perette perette 3802 Oct 25 16:56 queue2ics* Maybe you're like me, and find iCal and other calendar programs to be a pain in the ass about event entry. This converts my "queue.txt" file into a .ics (iCalendar, RFC 2445) file, which can then be published and read by iCal to make a pretty calendar and/or share with friends. The queue file format is: [Time in HH:MM [ " - " ] Event title [ " - " ] [ " @ " ] Samples: 2007-12-21 Yule / Winter Solstice (all day event) 2007-01-01 07:38 New Years - First sunrise of the year @ Rochester, NY 2007-11-22 11:00 - 15:00 Thanksgiving dinner @ mom's house An event with a time, but not an end-time, is given two hours length. -rwxr--r-- 1 perette perette 3401 Oct 25 16:58 weekday* Returns the day of the month for a particular weekday. For example, weekday 3 mon nov 2007 asks for the third Monday in November 2007, yielding 19. The week can be 1 - 5, or 'last'. Last will return the 4th or 5th instance of a day, based on however many there are in a month; '5' returns the fifth weekday if it exists but returns an error (exiting non-0) if it doesn't. This script works with the BSD version of cal(1); other versions (GNU) may format their output slightly different and this may not work. -r-xr--r-- 2 perette perette 4406 Jan 14 12:30 wunderbackground-osx* Requires imagemagick utilities be installed from Fink or elsewhere, then converts Wunderground screen saver stuff into regular jpegs to be used typically as a desktop background. Fixed January 2008 for new version of screensaver (adjustment in 'tail' command quantity - formerly +5.)