Skip to content

Instantly share code, notes, and snippets.

@russ
Created October 30, 2008 21:57
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 russ/21155 to your computer and use it in GitHub Desktop.
Save russ/21155 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'open-uri'
while true do
r = open('http://google.com')
raise StandardError if r.status != [ '200', 'OK' ]
timestamp = Time.parse(r.read.match(/\<!\s*-- (.*?) (.*?)(--\s*\>)/)[2].strip)
raise StandardError if (Time.now - timestamp) > 600
sleep(60)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment