Skip to content

Instantly share code, notes, and snippets.

@joeyw
Created February 12, 2012 08:56
Show Gist options
  • Save joeyw/1807388 to your computer and use it in GitHub Desktop.
Save joeyw/1807388 to your computer and use it in GitHub Desktop.
#!/usr/local/bin/macruby
framework 'Cocoa'
framework 'Foundation'
class NotificationHandler
def handle(notification)
`itunes-update-notification`
end
end
center = NSDistributedNotificationCenter.defaultCenter
center.addObserver(NotificationHandler.new, selector:'handle:', name:'com.apple.iTunes.playerInfo', object:nil)
NSApplication.sharedApplication
NSApp.run
#!/usr/bin/env ruby
#
#
#
# Cleans your Queue.
require 'app/boot'
Play::Queue.clean
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment