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
| find the last exit code of a program. | |
| $ echo $? |
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
| compose - c | |
| scroll - j,k | |
| reply - r | |
| fwd - f | |
| reply all - a | |
| delete - # | |
| read/unread - shift + i, shift + u | |
| select message - x | |
| back to inbox - u |
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
| SELECT SQL_NO_CACHE COUNT(*) FROM `table`; |
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
| gitk path/to/filename |
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
| curl -H "Accept-Encoding:gzip" https://www.google.com/ | |
| // not gzipped | |
| curl -H "Accept-Encoding:gzip" https://github.com/ | gunzip | |
| // gzipped |
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
| $ git branch --set-upstream master origin/master | |
| # useful if you've used git flow init and it created a bunch of local branches that don't track the remotes | |
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
| caffeinate -is | |
| # -i prevent idle sleep | |
| # -s prevent system sleep |
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
| git co --theirs config/routes.rb | |
| # theirs means the branch you are merging into the current branch | |
| git co --ours config/routes.rb | |
| # ours means the current branch |
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
| crons aren't created by default for mac users now. | |
| you need to: | |
| $ sudo su - | |
| $ crontab -u username -e |
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
| $ time command | |