will.thoughts.pop
RSS icon Email icon Home icon
  • The ‘Britney Bomb’

    Posted on August 21st, 2007 Will 3 comments

    In 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.play

    This basically:

    1. Sleeps for 30 seconds (I left the room, I didn’t want to be around when the bomb went off after all).
    2. Gets the current volume.
    3. Scales the volume of the current track down to zero.
    4. Stops playback.
    5. Sets the volume back to the original volume.
    6. Announces to the office IRC channel that Britney Spears is wonderful (in my name).
    7. Sleeps 4 seconds to let the news sink in.
    8. 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.