Skip to content

Instantly share code, notes, and snippets.

View bheeshmar's full-sized avatar

Bheeshmar Redheendran bheeshmar

View GitHub Profile
def counts_of_files_by_extension(dir)
Dir["#{dir}/**/*"].reduce(Hash.new(0)) do |extension_counts, filepath|
extension_counts[File.extname(filepath)] += 1
extension_counts
end
end
directory = ARGV.shift || Dir.pwd
counts = counts_of_files_by_extension(directory)
@bheeshmar
bheeshmar / gnome-terminal-colors-for-putty.reg
Created February 27, 2012 18:43 — forked from tjensen/gist:1912325
I finally got fed up enough with PuTTY's default ANSI colors that I customized them to match the gnome-terminal settings on Ubuntu 10.04
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]
"Colour6"="0,0,0"
"Colour7"="85,87,83"
"Colour8"="204,0,0"
"Colour9"="239,41,41"
"Colour10"="78,154,6"
"Colour11"="138,226,52"
"Colour12"="196,160,0"