Welcome!
Thanks for visiting. If you found this information interesting or useful (or you think I'm dead wrong about something) I'd like to invite you to leave a comment on this post. You can also
subscribe to my RSS feed or sign up for email updates on the right-hand side of the page.
If you Digg what you StumbleUpon, find my writing del.icio.us, or are one of the Technorati, you know what to do:
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 Clock in perl. It sounds just like the alarm clock we have at home! Who says that you can’t use a Computer Science degree in ministry? If you can think of other approaches, post them in the comments.
#!/usr/bin/perl
my $s = time();
my $e = $s + (3600 * .005);
print "Starting at: $s\n";
while (time() < $e) {
print "Ending at: $e (".($e-time())." secs from now)\n";
sleep 5;
}
print "Press Control-C (or Mute) to turn off alarm.\n";
open( DSP, '>‘, ‘/dev/dsp’ );
while (1) { print DSP (\001 x 150); sleep 1; }
Related posts:
- Debugging long-running perl programs in Debian One of the slicker ways I've seen of trying to...
- The Value of Community, or Why I Love Perl I've been asked a number of times recently why I...
- Using next_successor with Graph::Traversal I recently needed to do a graph traversal using the...
- Koine Greek in Ubuntu Gutsy Gibbon Here's the simple process for installing Koine Greek input method...


October 3rd, 2007 09:39
Ya know, if you were using Windows, you could have just created a scheduled task…
I kid, I kid!
Hope things are going well!
- Cory