Magic words:
psql -U postgres
If run with -E
flag, it will describe the underlaying queries of the \
commands (cool for learning!).
Most \d
commands support additional param of __schema__.name__
and accept wildcards like *.*
$ rails new <app-name> --database=postgresql --webpack=react
$ cd <app-name>
$ echo '.idea' >> .gitignore # remove RubyMine's config
$ echo "ruby '2.4.0'" >> Gemfile # for Heroku Ruby version
$ git add .
$ git commit -m "Initial commit"
# Create new repo on GitHub with same name...
rails generate <type> --help # for examples
# Model (+ migration, test, fixtures)
rails generate model NAME [field[:type][:index] field[:type][:index]] [options]
rails generate model post title:string blog:references published:boolean position:integer
rails generate model product supplier:references{polymorphic}
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
Includes HTTP-Header information in the output