Skip to content

Instantly share code, notes, and snippets.

@jsahlen
Created February 9, 2010 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsahlen/299150 to your computer and use it in GitHub Desktop.
Save jsahlen/299150 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
URL = "http://store.apple.com/Apple/WebObjects/swedenstore"
down = true
while down
source = `curl -s #{URL}`
throw "connection error" if source.empty?
if source =~ /We'll be back soon/m
sleep 60
else
system %{growlnotify -s -w -a "Google Chrome" -t "Apple Store Uppe!" -m "Yay (?)"}
`open #{URL}`
down = false
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment