Prerequisites:
- Ruby 2.3+
- Rails 5.1+
- Webpacker 4.x.x
- Node.js 8.16.0+
- Yarn 1.x+
| wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz | |
| tar xzf Python-2.7.18.tgz | |
| cd Python-2.7.18 | |
| sudo ./configure --enable-optimizations | |
| sudo make altinstall | |
| sudo ln -s "/usr/local/bin/python2.7" "/usr/bin/python" |
| module Encryptable | |
| def encrypt(key) | |
| crypt.encrypt_and_sign(key) | |
| end | |
| def decrypt(key) | |
| crypt.decrypt_and_verify(key) | |
| end | |
| private |
| AllCops: | |
| DisplayCopNames: true | |
| DisplayStyleGuide: true | |
| TargetRubyVersion: 2.4 | |
| DisabledByDefault: true | |
| Exclude: | |
| - db/**/** | |
| - bin/* | |
| # Prefer &&/|| over and/or. |
| root# apt-get update | |
| root# apt-get upgrade | |
| // dependencies for Ruby | |
| root# apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev \ | |
| libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common libffi-dev \ | |
| libpcre3-dev unzip | |
| // Node.js v7 | |
| root# curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - |
aph·o·rism /afəˌrizəm/ noun
a pithy observation that contains a general truth, such as, “if it ain't broke, don't fix it.”.
how did i get here?
⬇ Luddite
| root# apt-get update | |
| root# apt-get upgrade | |
| // dependencies for Ruby | |
| root# apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev \ | |
| libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev \ | |
| libpcre3-dev unzip | |
| // Node.js v7 | |
| root# curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - |
| # to run: | |
| # find and replace username with your username | |
| adduser username | |
| usermod -aG sudo username | |
| su - username | |
| mkdir ~/.ssh | |
| chmod 700 ~/.ssh | |
| vim ~/.ssh/authorized_keys | |
| chmod 600 ~/.ssh/authorized_keys |
rails new <project_name> -d postgresql --skip-turbolinks --skip-spring -T-d postgresql sets up the project to use PostgreSQL--skip-turbolinks & --skip-spring creates a project that does not use turbolinks or spring-T skips the creation of the test directory and use of Test::Unit