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
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
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}
$ 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...
#!/bin/bash | |
if [ ! -f Gemfile ]; then | |
echo "Are you sure you're in a Ruby on Rails app?" | |
else | |
ln -s "$(pwd)" ~/.puma-dev/"$(basename `pwd`)" | |
puma-dev -install | |
echo "Your app should be available at http://$(basename `pwd`).dev and https://$(basename `pwd`).dev now!" | |
fi |