This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ========================== | |
| ======= 1. New App ======= | |
| ========================== | |
| $ mkdir smart_cart | |
| $ rails new smart_cart --database=postgresql | |
| $ cd smart_cart | |
| $ bundle update | |
| $ bundle install | |
| $ rails generate controller home index | |
| > config/routes.rb, root :to => "home#index" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ Runner Scripts ############ | |
| # $ rails runner db/scripts/staffer_adr_mig.rb | |
| # $ heroku run rails runner db/scripts/staffer_adr_mig.rb --app bds-max | |
| ############ | |
| # $ rails runner db/scripts/staffer_scrape_date_mig.rb | |
| # $ heroku run rails runner db/scripts/staffer_scrape_date_mig.rb --app bds-max | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ Delayed Job ############ | |
| $ rake jobs:clear | |
| $ heroku run rake jobs:clear --app sdf2 | |
| ######################################## | |
| ####### V. Delayed Jobs Schema ####### | |
| ####################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ command line - local ############ | |
| $ tail -f log/development.log | |
| $ bundle exec puma | |
| $!!! git force/pull/push if don't like changes. | |
| $ git hist -number | |
| $ git log -2 | |
| $ git log master -2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ Procfile ############ | |
| web: bundle exec rails server -p $PORT | |
| worker: bundle exec foreman start -f Procfile.workers | |
| worker: RAILS_MAX_THREADS=${SIDEKIQ_RAILS_MAX_THREADS:-25} bundle exec sidekiq | |
| worker: bundle exec sidekiq -C config/sidekiq.yml | |
| /Users/Adam/Desktop/MaxDigital/bds_max/config/sidekiq.yml | |
| /Users/Adam/Desktop/MaxDigital/bds_max/config/puma.rb | |
| /Users/Adam/Desktop/MaxDigital/bds_max/config/database.yml | |
| ------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ grep ############ | |
| $ grep -w "boo" file #=> search words only | |
| $ egrep -w 'word1|word2' /path/to/file #=> search 2 different words |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ Rainbow ############ | |
| require 'rainbow' | |
| puts Rainbow("even bright underlined!").yellow.underline.bright | |
| def colored(string) | |
| indicator = Rainbow("!=>>").yellow.bright | |
| main = Rainbow(string).yellow.underline.bright | |
| "\n\n#{indicator} #{main}\n" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ Sidekiq ########### | |
| $ redis-server /usr/local/etc/redis.conf #=> starts redis server | |
| $ bundle exec sidekiq #=> starts sidekiq | |
| Sidekiq: 500 Records updated in 20 sec | |
| Delayed: 500 Records updated in 18 sec | |
| Sidekiq: 4000 Records updated in 154.5 sec | |
| Delayed: 4000 Records updated in 135.6 sec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ############ Gem Install ############ | |
| Link: http://bundler.io/v1.5/groups.html | |
| $ bundle install --without test development | |
| $ bundle install --without production | |
| $ bundle install --with test development | |
| $ bundle install --with production | |
| $ bundle check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ######### SSL CERTS ####### | |
| brew update | |
| brew install openssl | |
| brew tap raggi/ale | |
| brew install openssl-osx-ca | |
| ##### | |
| A CA file has been bootstrapped using certificates from the SystemRoots | |
| keychain. To add additional certificates (e.g. the certificates added in | |
| the System keychain), place .pem files in | |
| /usr/local/etc/openssl/certs |
NewerOlder