Skip to content

Instantly share code, notes, and snippets.

View jruz's full-sized avatar
🏴

Javier Ruz jruz

🏴
View GitHub Profile
@jruz
jruz / .zshrc
Last active September 18, 2015 11:31 — forked from Morantron/eslint
Use local eslint if available if not use global
eslint () {
if [[ -f ./node_modules/.bin/eslint ]]; then
./node_modules/.bin/eslint $*
else
"${$(nvm which default)%node}eslint" $*
fi
}

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

/ A simplistic way of loading and rendering HAML partials (header.haml, footer.haml, nav.haml... you name it) without Rails
/ Useful when using tools like LiveReload http://livereload.com/
/ but don't want to configure a web server just to use PHP include/require constructs (discussion http://help.livereload.com/discussions/questions/22-haml-partials)
/ It could be improved/simplified using a helper http://stackoverflow.com/questions/5436769/partial-haml-templating-in-ruby-without-rails/5436973#5436973
/ Check out the Jade version https://gist.github.com/2593727
%html
%body
%header
= Haml::Engine.new(File.read('/path/to/your/partial.haml')).render(Object.new,{local: 'value'})