Skip to content

Instantly share code, notes, and snippets.

@ignu
Created July 26, 2011 17:45
Show Gist options
  • Save ignu/1107336 to your computer and use it in GitHub Desktop.
Save ignu/1107336 to your computer and use it in GitHub Desktop.
Colbert Report Ticket Notifier
require 'rubygems'
require 'ruby-growl'
require 'net/http'
comedy_central = Net::HTTP.new('impresario.comedycentral.com', 80)
growl = Growl.new "localhost", "ruby-growl", ["Colbert Report Tickets"]
growl.notify "Colbert Report Tickets", "Colbert Report Ticket Notifer", "You'll be alerted when tickets are available."
while true do
unless(comedy_central.get("/show/5b2eb3b0eb99f143", nil).body =~ /there are no tickets available/)
growl.notify "Colbert Report Tickets", "New Colbert Report Tickets Available", "Get them now!"
end
sleep 30
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment