Skip to content

Instantly share code, notes, and snippets.

@jwhiteman
Created May 15, 2014 03:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwhiteman/3625a7479082e245bf71 to your computer and use it in GitHub Desktop.
Save jwhiteman/3625a7479082e245bf71 to your computer and use it in GitHub Desktop.
Trolling twitter for 2-letter handles
require 'httparty'
include HTTParty
('aa'..'zz').select { |r|
sleep 0.20
puts "trying #{r}"
self.class.head("https://twitter.com/#{r}").code == 404
}
# => ['me', 'oh']
# Sadly, 'me' and 'oh' both return 404s, but aren't available. Too bad. I would have enjoyed either one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment