Skip to content

Instantly share code, notes, and snippets.

@gromnitsky
gromnitsky / gawker.rb
Created Dec 14, 2010
Counts n top email domain names leaked from Gawker's database
View gawker.rb
#!/usr/bin/env ruby
# -*-ruby-*-
data = 'gawker.data' if !File.file?(data = ARGV[1].to_s)
ntop = 50 if (ntop = ARGV[0].to_i) <= 5
raw = 0
mail = Hash.new 0
File.open(data) {|fp|
while line = fp.gets