Skip to content

Instantly share code, notes, and snippets.

@timruffles
Created August 22, 2011 16:29
Show Gist options
  • Select an option

  • Save timruffles/1162827 to your computer and use it in GitHub Desktop.

Select an option

Save timruffles/1162827 to your computer and use it in GitHub Desktop.
HP Touchpad watching made easy
puts "Watching #{ARGV[0]}"
changed = false
last = false
until changed
page = `curl #{ARGV[0]}`
unless last == false
changed = page != last
end
last = page
sleep 60
end
File.open("last.html","w+") {|f| f.write last }
File.open("page.html","w+") {|f| f.write last }
puts "Changed!"
puts `diff page.html last.html`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment