#!/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/) exit 1 end while (true) exit 0 if (time == 273) who = Net::HTTP.get(whois) me = who.split("|") if me[1].strip.to_i != token puts "" exit 1 end print "."; sleep 2; time += 2 end