Skip to content

Instantly share code, notes, and snippets.

@misostack
misostack / gist:abd28538f746119ef92f112a2c805006
Created October 2, 2017 10:28
rail 5 - command line - rails new -h
Usage:
rails new APP_PATH [options]
Options:
-r, [--ruby=PATH] # Path to the Ruby binary of your choice
# Default: /home/ubuntu/.rbenv/versions/2.4.2/bin/ruby
-m, [--template=TEMPLATE] # Path to some application template (can be a filesystem path or URL)
-d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/postgresql/sqlite3/oracle/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc)
# Default: sqlite3
[--skip-yarn], [--no-skip-yarn] # Don't use Yarn for managing JavaScript dependencies
@misostack
misostack / gist:6f3214af9b29c9cf8cc4d8330a065abd
Created October 2, 2017 10:30
rails 5 - command line - rails server -h
Usage:
rails server [puma, thin etc] [options]
Options:
-p, [--port=port] # Runs Rails on the specified port - defaults to 3000.
-b, [--binding=IP] # Binds Rails to the specified IP - defaults to 'localhost' in development and '0.0.0.0' in other environments'.
-c, [--config=file] # Uses a custom rackup configuration.
# Default: config.ru
-d, [--daemon], [--no-daemon] # Runs server as a Daemon.
-e, [--environment=name] # Specifies the environment to run this server under (development/test/production).
@misostack
misostack / gist:6c49305ae48adbe4ebf817bc574e9f93
Created October 2, 2017 10:44
rails 5 - command line - rails generate -h
Usage: rails generate GENERATOR [args] [options]
General options:
-h, [--help] # Print generator's options and usage
-p, [--pretend] # Run but do not make any changes
-f, [--force] # Overwrite files that already exist
-s, [--skip] # Skip files that already exist
-q, [--quiet] # Suppress status output
Please choose a generator below.
@misostack
misostack / pre-commit-prevent-master
Created November 10, 2017 09:42
pre-commit-prevent-master
#!/bin/bash
echo -e "[PREVENT] --> init (wait a second)"
BRANCH=`git rev-parse --abbrev-ref HEAD`
if [ $BRANCH == master ]; then
echo -e "[PREVENT] --> You are not allowed to commit to master!"
exit 1
else
echo -e "[PREVENT] --> Prevent commit passed"
@misostack
misostack / ng-new-help.txt
Last active January 19, 2019 17:19
ng new --help
ng new --help
arguments:
name
The name of the new workspace and initial project.
options:
--collection (-c)
A collection of schematics to use in generating the initial app.
--commit
Initial git repository commit information.
@misostack
misostack / ng-serve-help.txt
Created January 19, 2019 17:42
ng serve --help
$ ng serve --help
Builds and serves your app, rebuilding on file changes.
usage: ng serve <project> [options]
arguments:
project
The name of the project to build. Can be an app or a library.
options:
--aot
@misostack
misostack / git-command.md
Last active September 19, 2023 09:55
GIT commands

Git tips

First config

ssh-keygen -t rsa -C "misostack.com@gmail.com"
git config --global user.name "misostack"
git config --global user.email "misostack.com@gmail.com"
@misostack
misostack / all-about-yarn.md
Last active February 15, 2022 13:17
All About Yarn

Global

list global

yarn global list

add global

yarn global add {package-name}

upgrade global

yarn global upgrade {package-name) --lastest

remove global

yarn global remove {package-name}

@misostack
misostack / all-about-reactjs.md
Created September 26, 2019 12:18
All About ReactJS

Getting start

Install

yarn global add create-react-app

New Project