Skip to content

Instantly share code, notes, and snippets.

@l4u
l4u / gist:1273530
Created October 9, 2011 10:22
rename .JPG to .jpg
find . -name '*.JPG' -exec bash -c 'mv "$1" "${1/%.JPG/.jpg}"' -- {} \;
@l4u
l4u / gist:1551372
Created January 2, 2012 17:01
Flush Heroku Memcache with Dalli
heroku run console
Dalli::Client.new.flush
@l4u
l4u / gist:1610094
Created January 14, 2012 03:13
vim-powerline osx font forge
brew install --use-gcc fontforge
fontforge -script fontpatcher MyFontFile.ttf
rm /tmp/Powerline.cache
in .vimrc
set guifont=Menlo\ for\ Powerline:h14
let g:Powerline_symbols = 'fancy'
@l4u
l4u / gist:1610153
Created January 14, 2012 03:39
Install vim with ruby support on osx
rvm use system
brew install https://raw.github.com/gist/1594296/vim.rb
@l4u
l4u / gist:1611418
Created January 14, 2012 13:28
heroku snippets
heroku create --stack cedar
heroku rename new_app
heroku create new_app --stack cedar
heroku addons:add logging:expanded
heroku addons:upgrade logging:expanded
http://devcenter.heroku.com/articles/mongolab
heroku addons:add mongolab:starter
@l4u
l4u / gist:1703226
Created January 30, 2012 08:05
RMagick segmentation fault
brew uninstall imagemagick
brew install imagemagick --disable-openmp
@l4u
l4u / gist:1908558
Created February 25, 2012 13:48
Downgrade node to 0.4.12
brew remove node --force
brew versions node
git checkout 3eea412 /usr/local/Library/Formula/node.rb
brew install node
@l4u
l4u / gist:1914609
Created February 26, 2012 07:00
JRuby nailgun server with rbenv
# for other JRuby processes, use nailgun and 1.9
export JRUBY_OPTS="--ng --1.9"
# to start a nailgun server
export JRUBY_OPTS='--1.9'
function rbenvsudo(){
executable=$1
--type-set=haml=.haml
--type-set=sass=.sass
--type-set=scss=.scss
--type-set=erb=.erb
--type-set=coffee=.coffee
--type-set=feature=.feature
--type-add=ruby=.haml
--type-add=js=.javascript
--type-add=js=.coffee
--ignore-dir=vendor/bundle/