-
The ‘Britney Bomb’
Posted on August 21st, 2007 3 commentsIn the 29degrees office we have an mp3 jukebox that is basically a mac-mini with iTunes and VNC on it, it was playing some ‘Death Cab For Cutie’ when the bomb went off. Everyone is using a Mac as their computer, I have installed RubyOSA. This sets the stage for the ‘Britney Bomb’.
I fired up an irb session and typed the following:
> require 'rubygems'
> require 'rbosa'
> itunes = OSA.app('iTunes', :machine=>'jukebox.local')
> c = OSA.app('Colloquy')
> sleep(30); v = itunes.sound_volume; itunes.sound_volume.downto(0) { |i| itunes.sound_volume = i; sleep 0.05 }; itunes.stop; itunes.sound_volume = v; c.send_message('Britney FTW!'); sleep(4); itunes.sources[2].playlists.first.search('britney').first.playThis basically:
- Sleeps for 30 seconds (I left the room, I didn’t want to be around when the bomb went off after all).
- Gets the current volume.
- Scales the volume of the current track down to zero.
- Stops playback.
- Sets the volume back to the original volume.
- Announces to the office IRC channel that Britney Spears is wonderful (in my name).
- Sleeps 4 seconds to let the news sink in.
- Plays the first Britney Spears tune it finds in Carl‘s library (which the jukebox uses), this happens to be ‘Baby One More Time’
This amuses me greatly.
3 responses to “The ‘Britney Bomb’”
-
You could pretty the code up a little :)
-
Funny :-) Is your machine still there when you go back in the office? :-)
-
It was there after the ‘Britney Bomb’, but when I left the office I primed the ‘Aqua Bomb’ (‘barbie Girl’ to be precise) so it remains to be seen wether my computer is there in the morning :)
Leave a reply


