| Key/Command | Description |
|---|---|
| Tab | Auto-complete files and folder names |
| Ctrl + A | Go to the beginning of the line you are currently typing on |
| Ctrl + E | Go to the end of the line you are currently typing on |
| Ctrl + U | Clear the line before the cursor |
| Ctrl + K | Clear the line after the cursor |
| Ctrl + W | Delete the word before the cursor |
| Ctrl + T | Swap the last two characters before the cursor |
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
| # To add a name to migration files rather than 001_auto_20189084774 | |
| python manage.py makemigrations --name DESIRED_NAME appName | |
| # e.g. if app name is `site` and you want to name migration, `new_side_bar` | |
| python manage.py makemigrations --name new_side_bar site |
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
| a. git rm -r --cached . # unstage all files on your local machine | |
| b. add the said files to gitignore | |
| c. git add . # add all files again | |
| d. commit and push again or rebase. use rebase guide |
(Also see [remarkable][], the markdown parser created by the author of this cheatsheet)
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. https://itnext.io/how-to-use-github-desktop-with-gitlab-cd4d2de3d104 |
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
| # IIFE, destructuring, and spreading | |
| # given and object of colors | |
| const colors = {red: '#ff0000',green: '#00ff00', blue: '#0000ff' } | |
| # We can remove blue without using a filter by doing this | |
| ((blue, ...rest) => rest)(colors) |
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
| # upgraded node and needed to downgrade later | |
| nvm install 8.11.1 ( lower version) | |
| nvm use 8.11.1 ( to use the lower version) | |
| # expect this to work forward |
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
| sudo chown -R $USER /usr/local/lib/node_modules |