Skip to content

Instantly share code, notes, and snippets.

@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
@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:1703226
Created January 30, 2012 08:05
RMagick segmentation fault
brew uninstall imagemagick
brew install imagemagick --disable-openmp
@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: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: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:1551372
Created January 2, 2012 17:01
Flush Heroku Memcache with Dalli
heroku run console
Dalli::Client.new.flush
@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:1257632
Created October 2, 2011 17:00
cocos2d-x userDefault crashes on Android
10-03 00:54:30.423: INFO/DEBUG(30): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
10-03 00:54:30.423: INFO/DEBUG(30): Build fingerprint: 'generic/sdk/generic/:2.2/FRF91/43546:eng/test-keys'
10-03 00:54:30.423: INFO/DEBUG(30): pid: 316, tid: 325 >>> org.cocos2dx.tests <<<
10-03 00:54:30.433: INFO/DEBUG(30): signal 11 (SIGSEGV), fault addr deadbaad
10-03 00:54:30.433: INFO/DEBUG(30): r0 00000000 r1 0000000c r2 00000027 r3 00000000
10-03 00:54:30.433: INFO/DEBUG(30): r4 00000000 r5 deadbaad r6 00001728 r7 00000000
10-03 00:54:30.433: INFO/DEBUG(30): r8 48218d84 r9 4185af14 10 4185af00 fp 00236d70
10-03 00:54:30.433: INFO/DEBUG(30): ip ffffffff sp 48218a48 lr afd154c5 pc afd11dc4 cpsr 40000030
10-03 00:54:30.523: INFO/DEBUG(30): #00 pc 00011dc4 /system/lib/libc.so