$ rails g model User
belongs_to
has_one
brew install git | |
#Install a package | |
brew upgrade git | |
#Upgrade a package | |
brew unlink git | |
#Unlink | |
brew link git |
# first: | |
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
# go to /usr/local/lib and delete any node and node_modules | |
cd /usr/local/lib | |
sudo rm -rf node* |
gzip -d -k *.gz |
# Controller Plural | |
rails g controller Users index show | |
# Helper Plural | |
rails g helper Users | |
# Mailer Singular | |
rails g mailer UserMailer | |
# Migration Plural |
break | |
case | |
catch | |
class | |
const | |
continue | |
debugger | |
default | |
delete | |
do |
const getSecret = (secret) => { | |
return { | |
get: () => secret | |
}; | |
}; | |
test('Closure for object privacy.', assert => { | |
const msg = '.get() should have access to the closure.'; | |
const expected = 1; | |
const obj = getSecret(1); |
Rails.application.config.assets.paths // to see a list of load paths |
#!/bin/bash | |
# La prima riga dello script è lo shebang il quale dice al sistema come eseguire | |
# lo script: http://it.wikipedia.org/wiki/Shabang | |
# Come avrai già immaginato, i commenti iniziano con #. Lo shebang stesso è un commento. | |
# Semplice esempio ciao mondo: | |
echo Ciao mondo! | |
# Ogni comando inizia su una nuova riga, o dopo un punto e virgola: |
//Single line comments are removed when Sass is compiled to CSS. | |
/* Multi line comments are preserved. */ | |
/* Variables |