Skip to content

Instantly share code, notes, and snippets.

@AliciaMoses
Last active August 29, 2025 13:02
Show Gist options
  • Select an option

  • Save AliciaMoses/2176880fead473afdb109cd209e8a194 to your computer and use it in GitHub Desktop.

Select an option

Save AliciaMoses/2176880fead473afdb109cd209e8a194 to your computer and use it in GitHub Desktop.

Terminal & Shell

Basic Configuration

  • Open config file: nano ~/.zshrc
  • Add history to plugins: plugins=(history)
  • Reload zsh: source ~/.zshrc

Cursor Movement

  • Move to beginning of line: Ctrl + A
  • Move to end of line: Ctrl + E
  • Move back one word: Option +
  • Move forward one word: Option +

Directory Navigation

  • List navigation stack with numbers: dirs -v
  • Create nested directory path and navigate: mkdir -p ece/local-dev/src/ && cd $_
  • Zsh plugins reference

Git & Source Control

Basic Operations

  • Switch to previous branch: git checkout -
  • Unstage file: git reset <file>
  • View git history: git reflog --date=iso
  • git checkout tool

GitHub

  • Checkout pull request locally: gh pr checkout <pr_number>
  • Explore code in browser: Replace github.com with github.dev
  • Create quick notes: gist.new
  • Finding old commits: Browse CircleCI workflow runs!

Code Editor (VS Code)

Line Operations

  • Duplicate line/selection: Shift + Option + /
  • Move line up/down: Option + /
  • Delete line: Cmd + Shift + K
  • Insert line below: Cmd + Enter
  • Insert line above: Cmd + Shift + Enter

Multiple Cursors & Selection

  • Add next occurrence: Cmd + D
  • Select all occurrences: Cmd + Shift + L
  • Add cursor above/below: Option + Cmd + /
  • Column selection (keyboard): Shift + Option + Cmd + arrows

Navigation

  • Go to definition: F12
  • Peek definition: Option + F12
  • Quick open file: Cmd + P
  • Go to symbol in file: Cmd + Shift + O

Django

Useful commands

  • Show applied migrations: python manage.py showmigrations <app_name>
  • Inspect database schema: python manage.py inspectdb
  • Dump app data to JSON: python manage.py dumpdata <app_name> > data.json
  • Check URLs: python manage.py show_urls
  • Output models diagram: python manage.py graph_models <app_name> -o <output_file>.png

Debug Toolbar

# In data/env file
DEBUG=1
ENABLE_DEBUG_TOOLBAR=1

Misc

Template Linting

JSON Validation

Regex

Diagramming and visualisation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment