Last active
October 19, 2023 16:30
-
-
Save contolini/9bd2bd9bb8cf1e12b1727078571460a0 to your computer and use it in GitHub Desktop.
ohmyzsh aliases
This file contains 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
alias dl="cd ~/Downloads" | |
alias dt="cd ~/Desktop" | |
alias p="cd ~/Projects" | |
alias g="git" | |
alias h="history" | |
alias v="vim" | |
alias o="open" | |
alias oo="open ." | |
# Delete stuff | |
alias murder='rm -rf' | |
alias seppuku='rm -rf ./* && rm -rf ./.* 2> /dev/null' | |
# Start a server | |
alias server="open http://127.0.0.1:1337 && http-server -p 1337" | |
# Recursively delete `.DS_Store` files | |
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete" | |
# Hide/show all desktop icons (useful when presenting) | |
alias hidedesktop="defaults write com.apple.finder CreateDesktop -bool false && killall Finder" | |
alias showdesktop="defaults write com.apple.finder CreateDesktop -bool true && killall Finder" | |
# Clean up pyc files | |
alias rmpyc="find . -name \"*.pyc\" -exec rm -rf {} \;" | |
# Git stuff | |
alias rmorig="find . -name '*.orig' -delete" | |
# Make a dir and cd into it | |
function mkcd () { mkdir -p "$@" && cd "$@"; } | |
# Opens current repo in GitHub in browser (origin remote) | |
alias gho="open \`git remote -v | grep git@github.com | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" | |
# github cli enterprise | |
alias ghe="GH_HOST=github.cfpb.gov gh" | |
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment