This blog is in the process of moving to Markw.us, just take note.
Friday, March 18, 2005
A cron Clock
How long does it take for me to set an alarm clock? About 2 hours.
Recently I've been using my iPod and headphones as an alarm clock, it works pretty well, but isn't exactly the best solution. My real alarm clock is exactly worthless. (I'm a very sound sleeper) so out of boredom I started messing around seeing about making my iBook an alarm clock since its doesn't go to sleep (usually DLing bittorrent files), and its pretty loud. It also has the same files as the iPod It also gave me an excuse to mess around with Apple Script, which is one of those things I've been meaning to do since, umm, around System 7.5 (just this side of forever) I also wanted to mess around with the cron function of the *nix underpinnings since I've gotten pretty bad about backups, and cron is one of those useful tools that will do it in the background on a regular basis.
So basically here's how I set my clock:
this basically tells itunes to start up, set the system volume and iTunes volume to max (its weird that Apple is still using the same system wide volume definitions (4 bit) as they did with OS 4 in OS X.3 while iTunes is using percentages) it then starts playing my designated playlist (don't even ask what's in it) it then does something that my iPod can't - turn on fullscreen visuals.
That's the pure code which is now saved as an application. Then I went into cron (I cheated and used a GUI toolset - hey it is 5 AM) and set up alarms based on Monday - Thursday and Friday to Sunday.
Anyways, now that I've wasted 2 hours setting my alarm (and 4 hours before that rewiring my DSL connection), I'm going to go to sleep so tomorrow I can work on reconnecting the LAN and possibly work on more applescript (cuz its fun, almost exactly like the psuedocode we're doing in programming and logic)
/me goes off to sleep wondering if he can make an applescript to read and control the temperature of the fridge mac though the serial port of a laptop...
Well, if you'd rather try a more hardward based soln...Post a Comment
Crack open your alarm clock, remove the tinny (and quiet) internal speaker and replace it with a 1/8" headphone jack. Then, tie it into your existing stereo/amplification system.
I did it. Tied it into my 2000W stereo system, and now I can wake up my entire floor. (~60 guys) Even the most sound sleepers can't sleep through about 100dBa.
Links to this post: