Skip to content

Instantly share code, notes, and snippets.

guard init pow
guard 'pow' do
watch('.powrc')
watch('.powenv')
watch('.rvmrc')
watch('Gemfile')
watch('Gemfile.lock')
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.*\.rb$})
watch(%r{^config/initializers/.*\.rb$})
bundle exec guard
a = null
a?
=> false
b = 42
b?
=> true
# équivalences
a ?= b
a = b unless a?
a = a ? b
() -> console.log "Hello from coffee"
(function() {
return console.log("Hello from coffee");
});
cube = (num) -> Math.pow num, 3
cube = function(num) {
return Math.pow(num, 3);
};
var f = function() {}
// et non:
function f() {}