Created
August 22, 2011 16:29
-
-
Save timruffles/1162827 to your computer and use it in GitHub Desktop.
HP Touchpad watching made easy
This file contains hidden or 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
| 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