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
On macOS High Sierra (and perhaps earlier), cron is disabled in some configurations. There is, however, still a LaunchDaemon for it. | |
Check to see if cron is enabled: | |
sudo launchctl list | grep cron | |
You should see com.vix.cron.plist if cron is running. If cron is not running, you should do: | |
sudo launchctl load -w /System/Library/LaunchDaemons/com.vix.cron.plist | |
That will start cron, and the -w switch will make sure it starts after reboots as well. |
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
Open terminal | |
> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
Say yes to X-Code (have fast connection for download) | |
> brew install rbenv ruby-build | |
Add rbenv to bash so that it loads every time you open a terminal | |
> echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile | |
> source ~/.bash_profile | |
Install Ruby |
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
Asynchronous charts |
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
Create a Postgres user for the Rails app, switch into the Postgres user: | |
> sudo su postgres | |
Then login to the databse "postgres" with the adn\min of "postgres" | |
> psql -d postgres -U postgres | |
or > sudo -u postres psql | |
Then create a user (or a "role", as Postgres calls it): | |
create role myapp with createdb login password 'password1'; | |
> ALTER user myapp with superuser; | |
> psql postgres |
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
Sublime in Vintage mode: I am now rocking | |
Join 3 lines: v for visual mode select then: cmd J | |
Select every instance of the word you are on: cmd ^ G (Man OH Man) | |
Select the word: cmd D | |
Multiple cursors: to edit with multiple cursors go to first letter of word and enter: cmd D, next cmd D again to enter 2nd occurance and hence 2nd cursor | |
Visual select: Shif up/down/lft/rgt Go to beginning of line: cntrl cmd L cntrl left | |
Column view: hold down alt up/down/lft/rgt or mouse | |
Select the entire line: Shift cmd lft | |
Move through tabs: cntrl cmd left rght |
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
Innitialize Git | |
$ git config --global user.name "Your Name" | |
$ git config --global user.email [email protected] | |
$ git init | |
$ git add -A | |
The added files are initially placed in a staging area, which contains pending |
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 rails -v 5.0.0 | |
Adding referance to migration | |
rails g migration AddUserToUploads user:references | |
rails g scaffold Tool name:string description:text | |
rails g migration AddToolToUsdzar tool:references |
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
brew install postgresql | |
If this is your first time installing Postgres with Homebrew, you'll need to | |
create a database with: | |
$ initdb /usr/local/var/postgres -E utf8 | |
mkdir -p ~/Library/LaunchAgents | |
cp /usr/local/Cellar/postgresql/9.5.3/homebrew.mxcl.postgresql.plist | |
~/Library/LaunchAgents/ | |
lunchy start postgres | |
lunchy stop postgres |
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
ctrl - c create | |
ctl-p previous n next w list | |
tmux new -s name to create a new session to re-attach to in future | |
ctrl-b d detach from session | |
tmux list-sessions lists the sessions | |
tmux attach name attaches to the session | |
ctrl-b o moves to pane | |
ctrl-b " opens horizontally | |
ctrl-b % opens virtically |