Created
October 27, 2016 16:40
-
-
Save jaredatron/fa268c49d82169fd428dc1f47b2ab4a3 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
require 'httparty' | |
loop do | |
response = HTTParty.get('http://store.apple.com/') | |
if response.include?('http://images.apple.com/r/store/backsoon/1x-covers-animation-v3.gif') | |
puts "not yet" | |
sleep 10 | |
else | |
break | |
end | |
end | |
system(%{osascript -e 'display notification "Buy Laptop! :D" with title "New Macbooks"'}) | |
system(%{open 'http://store.apple.com'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solid beginning to a codebase. :)