Skip to content

Instantly share code, notes, and snippets.

@r-i-c-h
Created June 22, 2020 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-i-c-h/a09f1e121137acaf98463272ed4df2e5 to your computer and use it in GitHub Desktop.
Save r-i-c-h/a09f1e121137acaf98463272ed4df2e5 to your computer and use it in GitHub Desktop.
Some of the aliases from my .bash_profile
# My Aliases
alias ..="cd .."
alias rmrf="rm -rf"
# ls on steroids:
alias see="ls -laShF | more"
# Some Apple MacOS specifics for showing/hiding hidden files in the Finder
alias showfiles="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app"
alias hidefiles="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app"
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder"
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder"
# git shortcut commands
alias st="git status"
alias diff="git diff"
alias glog="git log"
alias com="git commit"
alias ghist="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" # --decorate --oneline
# package.json things because I am a burnout
alias whut="cat package.json | more"
alias whutscripts="awk '/\"scripts\"/,/},$/' package.json" # either awk '/"scripts"/,/},$/' package.json OR sed -n '/"scripts"/,/},$/p' package.json
# For /node_modules/ folders
## Find and recursively LIST all node_modules/
alias findallnodemod="find . -name 'node_modules' -type d -prune -print | xargs du -chs"
## Find and recursively DELETE all node_modules/
alias killallnodemod="find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \;"
# youtube-dl pretty much defaults to this now, but it was a way to force best-quality:
alias dl="youtube-dl -i -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' "
# quick cd to the directory I mainly work on code from:
alias workbox="cd /Users/riz/Dropbox/workbox"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment