Skip to content

Instantly share code, notes, and snippets.

@pjhyett
Created February 4, 2010 23:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pjhyett/51f7e363a06a87230928 to your computer and use it in GitHub Desktop.
Save pjhyett/51f7e363a06a87230928 to your computer and use it in GitHub Desktop.

For those that missed the original tweet...

...that was followed quickly by:

Well, we recently passed 10,000 followers and it's time to pick a winner:

~/Development/github(master)$ irb
>> require 'open-uri'
=> true
>> user_id = open("http://twitter.com/followers/ids/github.xml").read.scan(/\d+/).sort_by { rand }.first
=> "9848912"
>> user_name = open("http://twitter.com/users/show.xml?user_id=#{user_id}").read[/screen_name>(\w+)/, 1]
=> "tekin"

Congrats to tekin on your free large account for the year!

http://github.com/tekin

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