Created
February 9, 2010 12:18
-
-
Save jsahlen/299150 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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