Last active
September 22, 2025 18:21
-
-
Save meimakes/b0ca50e0738360922d891f1537c73591 to your computer and use it in GitHub Desktop.
Ready-to-install Bash aliases collection for parent developers.
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
| #!/bin/bash | |
| # | |
| # Parent Developer Aliases Collection | |
| # From: https://systemsmama.com/p/command-line-shortcuts-for-the-chronically | |
| # | |
| # Installation: | |
| # 1. Download this file: curl -O https://gist.githubusercontent.com/meimakes/b0ca50e0738360922d891f1537c73591/raw/0e19dd96335471b86aa543ce14b35146a2a10326/parent-developer-aliases.sh | |
| # 2. Backup your config: cp ~/.zshrc ~/.zshrc.backup | |
| # 3. Source this file: echo "source ~/parent-developer-aliases.sh" >> ~/.zshrc | |
| # 4. Reload: source ~/.zshrc | |
| # | |
| # Or copy individual aliases to your ~/.zshrc or ~/.bashrc | |
| # | |
| # Suggestion: start with these three essential aliases, then add more as needed: | |
| # save - instantly preserve work when interrupted | |
| # quickfix - emergency production fixes | |
| # last - remember what you were doing | |
| # === POWER USER TIP === | |
| # Dynamic commit messages without quotes | |
| alias gc='function _gc(){ git commit -m "$*"; }; _gc' | |
| # Usage: gc Fixed the API timeout issue | |
| # === START HERE - ESSENTIAL THREE === | |
| alias save="git add . && git commit -m 'WIP: interrupted by life' && git push" | |
| alias quickfix="git pull --rebase && git add . && git commit -m 'Quick fix' && git push" | |
| alias last="git log --oneline -5" | |
| # === END ESSENTIAL THREE === | |
| # === Emergency Git Workflows === | |
| # For when things break and you need to act fast | |
| # Save your work instantly when you hear baby crying | |
| alias backup="git add . && git commit -m 'Backup before trying something' && git push" | |
| # See everything at once when context-switching back | |
| alias status="git status && echo '---' && git log --oneline -3" | |
| # What changed in the last commit | |
| alias changes="git diff HEAD~1" | |
| # Quick branch management | |
| alias main="git checkout main && git pull" | |
| alias newbranch="git checkout -b" | |
| alias deletebranch="git branch -d" | |
| # When you need to abandon ship quickly | |
| alias abort="git reset --hard HEAD && git clean -fd" | |
| alias unstage="git reset HEAD ." | |
| # === Quick Project Switching === | |
| # Navigate between projects without thinking | |
| alias work="cd ~/work && ls" | |
| alias personal="cd ~/personal-projects && ls" | |
| alias blog="cd ~/blog && code . && hugo server -D" | |
| # Quick environment setup - one command to start working | |
| alias devup="docker-compose up -d && npm run dev" | |
| alias devdown="docker-compose down && pkill -f 'node'" | |
| alias fresh="rm -rf node_modules && npm install && npm run dev" | |
| # Open common project combinations | |
| alias workday="code ~/work/current-project && cd ~/work/current-project" | |
| alias blogpost="cd ~/blog && hugo new content/posts/$(date +%Y-%m-%d)- && code ." | |
| # === Development Environment Shortcuts === | |
| # Speed up common development tasks | |
| # Server management | |
| alias serve="python -m http.server 8000" | |
| alias nodeserve="npx serve -s build -l 3000" | |
| alias hugoserve="hugo server -D --bind 0.0.0.0 --port 1313" | |
| # Testing shortcuts | |
| alias test="npm test" | |
| alias testwatch="npm test -- --watch" | |
| alias testcoverage="npm test -- --coverage" | |
| # Package management | |
| alias ni="npm install" | |
| alias nid="npm install --save-dev" | |
| alias nrun="npm run" | |
| # Quick file operations | |
| alias ll="ls -la" | |
| alias ..="cd .." | |
| alias ...="cd ../.." | |
| # Process management | |
| alias ports="lsof -i -P -n | grep LISTEN" | |
| alias killnode="pkill -f node" | |
| # Kill process on specific port | |
| killport() { | |
| lsof -ti:$1 | xargs kill -9 2>/dev/null && echo "Killed process on port $1" || echo "No process on port $1" | |
| } | |
| # === Mobile & Remote Coding === | |
| # For coding on iPad/phone via SSH | |
| # Ultra-short for thumb typing | |
| alias m="git add . && git commit -m" # usage: m "quick fix" | |
| alias p="git push" | |
| alias pl="git pull" | |
| alias s="git status -s" | |
| alias d="git diff" | |
| # GitHub Codespaces/remote development | |
| alias remote="gh cs ssh" | |
| alias cslist="gh cs list" | |
| alias cscode="gh cs code" | |
| # Quick file edits on mobile | |
| alias v="vim" | |
| alias n="nano" | |
| # === Content Creation Workflows === | |
| # For building in public while building humans | |
| # Blog post management | |
| alias newpost="hugo new content/posts/$(date +%Y-%m-%d)-" | |
| alias preview="hugo server -D --bind 0.0.0.0" | |
| alias publish="git add . && git commit -m 'New post' && git push" | |
| # Quick content ideas capture | |
| alias idea="echo '$(date +%Y-%m-%d): ' >> ~/content-ideas.md && code ~/content-ideas.md" | |
| alias ideas="cat ~/content-ideas.md" | |
| # === System Admin (When You're Also Family IT) === | |
| # Quick fixes for the computer everyone else uses too | |
| alias diskspace="df -h | grep -E '^/dev/' | sort -k5 -rn | head -5" | |
| alias fixwifi="sudo systemctl restart NetworkManager" | |
| alias reboot="sudo shutdown -r now" | |
| # === Advanced Git Workflows === | |
| # Level up once you're comfortable with the basics | |
| # One-command pull request workflow | |
| alias pr="git push && gh pr create --fill" | |
| # Quick conflict resolution | |
| alias conflicts="git diff --name-only --diff-filter=U" | |
| alias resolve="git add . && git commit -m 'Resolve conflicts'" | |
| # Branch cleanup | |
| alias cleanup-branches="git branch --merged | grep -v main | xargs -n 1 git branch -d" | |
| # === Multi-Project Management === | |
| # Handle multiple projects efficiently | |
| # Update all your projects at once | |
| alias update-all="find ~/projects -name '.git' -type d -execdir git pull \;" | |
| alias status-all="find ~/projects -name '.git' -type d -execdir git status -s \;" | |
| # === Project Templates === | |
| # Start new projects instantly | |
| alias new-react="npx create-react-app" | |
| alias new-hugo="hugo new site" | |
| alias new-node="mkdir -p new-project && cd new-project && npm init -y" | |
| # === COMMON WORKFLOWS === | |
| # | |
| # Morning startup: | |
| # 1. workday (opens editor and navigates to project) | |
| # 2. devup (starts Docker and dev server) | |
| # 3. status (see where you left off) | |
| # | |
| # Emergency fix during naptime: | |
| # 1. backup (save current experiment) | |
| # 2. main (switch to main branch) | |
| # 3. [make fix] | |
| # 4. quickfix (deploy immediately) | |
| # | |
| # End of fragmented coding session: | |
| # 1. save (preserve everything) | |
| # 2. devdown (cleanup processes) | |
| # | |
| # Mobile coding from waiting room: | |
| # 1. remote (connect to Codespace) | |
| # 2. s (check status) | |
| # 3. [quick edit] | |
| # 4. m "Fix typo in API response" | |
| # 5. p (push changes) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment