Skip to content

Instantly share code, notes, and snippets.

@jaredatron
Created October 27, 2016 16:40
Show Gist options
  • Save jaredatron/fa268c49d82169fd428dc1f47b2ab4a3 to your computer and use it in GitHub Desktop.
Save jaredatron/fa268c49d82169fd428dc1f47b2ab4a3 to your computer and use it in GitHub Desktop.
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'})
@pllearns
Copy link

Solid beginning to a codebase. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment