Last active
December 19, 2015 08:49
-
-
Save raws/5928654 to your computer and use it in GitHub Desktop.
Ruby script that throws up a Notification Center alert when Picroma user registrations open up so I can buy and download Cube World
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
#!/usr/bin/env ruby | |
require 'http' | |
require 'logger' | |
require 'terminal-notifier' | |
logger = Logger.new(STDOUT) | |
loop do | |
body = Http.get('https://picroma.com/account/create') | |
if body !~ /user registrations are currently disabled/i | |
logger.info 'Picroma user registrations are open!' | |
TerminalNotifier.notify 'Click here to register!', title: 'Picroma registrations are open!', open: 'https://picroma.com/account/create' | |
exit | |
end | |
logger.info 'Picroma user registrations are still closed :(' | |
sleep 60 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment