Skip to content

Instantly share code, notes, and snippets.

@gromnitsky
gromnitsky / gawker.rb
Created December 14, 2010 13:34
Counts n top email domain names leaked from Gawker's database
#!/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