Last active
November 22, 2023 23:30
-
-
Save Checksum/796f439e70b7e486e4cd71f25432d51e to your computer and use it in GitHub Desktop.
zshrc.local
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
# git | |
alias gs='git status' | |
alias gd='git diff' | |
alias gds='git diff --staged' | |
alias gcom='git checkout master' | |
alias gco='git checkout' | |
alias gp='git pull' | |
alias git-deleted='git log --diff-filter=D --summary' | |
# utils | |
alias cd..='cd ..' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias .....='cd ../../../..' | |
alias ......='cd ../../../../..' | |
alias whatismyip='dig +short myip.opendns.com @resolver1.opendns.com' | |
alias flushdns='sudo killall -HUP mDNSResponder' | |
alias httpd='python3 -m http.server' | |
alias rm='trash' | |
alias aws='docker run --rm -it -v ~/.aws:/root/.aws -v $(pwd):/aws --env-file <(env | grep AWS_) aws-cli' | |
alias x86="arch -x86_64 zsh" | |
alias arm="arch -arm64 zsh" | |
jsondiff() { diff <(jq -S . "${1:-a.json}") <(jq -S . "${2:-b.json}") } | |
create-ramdisk() { diskutil partitionDisk $(hdiutil attach -nomount ram://2048000) 1 GPTFormat APFS 'ramdisk' '100%' } | |
gensecret() { openssl rand -base64 ${1:-64} } | |
kill-port() { lsof -t -i ":$1" | xargs kill -9 } | |
ssh-escape() { for var in "$@"; do printf "'%s' " "$(printf %s "$var" | sed "s/'/'\\\\''/g")"; done | sed 's/ $//'; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment