Skip to content

Instantly share code, notes, and snippets.

@Pretz
Created February 26, 2009 06:37
Show Gist options
  • Save Pretz/70702 to your computer and use it in GitHub Desktop.
Save Pretz/70702 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby -wKU
require 'net/http'
require 'uri'
### SEE http://www.kloonigames.com/blog/games/4mins33secs
STDOUT.sync = true; token = rand(28000); time = 0
uri_root = "http://www.kloonigames.com/nordicjam2009/"
start = URI.parse(uri_root + "new_game.php?v=#{token}");
whois = URI.parse(uri_root + "whois.txt");
start = Net::HTTP.get(start)
if ! start =~ /1/ then puts ""; exit 1; end
while (true)
if time >= 273 then puts ""; exit 0 end
who = Net::HTTP.get(whois); me = who.split("|")
if me[1].strip.to_i != token then puts ""; exit 1 end
print "."; sleep 2; time += 2
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment