Skip to content

Instantly share code, notes, and snippets.

@dentedtriangle
dentedtriangle / gist:2100929
Created March 19, 2012 07:31
Remove all .DS_Store files in all directories <= current directory
sudo find . -name ".DS_Store" -depth -exec rm {} \;
desc "Creates haml files for each of the erb files found under views (skips existing)"
task :erb2haml do from_path
from_path = File.join(File.dirname(__FILE__), '..', '..', 'app', 'views')
Dir["#{from_path}/**/*.erb"].each do |file|
puts file
# for each .erb file in the path, convert it & output to a .haml file
output_file = file.gsub(/\.erb$/, '.haml')
`bundle exec html2haml -ex #{file} #{output_file}` unless File.exist?(output_file)
end
end
@dentedtriangle
dentedtriangle / gist:2026297
Created March 13, 2012 02:58
Homebrew command-line installation
/usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"