Skip to content

Instantly share code, notes, and snippets.

@cezary
Created October 4, 2022 15:01
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 cezary/294bdeea119b3653fef750478b2598ef to your computer and use it in GitHub Desktop.
Save cezary/294bdeea119b3653fef750478b2598ef to your computer and use it in GitHub Desktop.
# shortcuts
alias dl="cd ~/Downloads"
alias dt="cd ~/Desktop"
alias p="cd ~/Projects"
# Get macOS Software Updates, and update installed Ruby gems, Homebrew, npm, and their installed packages
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g;'
# Google Chrome
alias chrome='/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome'
alias canary='/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary'
# shell shortcuts
alias copy="pbcopy"
alias paste="pbpaste"
alias lt="ls -ltr"
alias mjson="python -mjson.tool"
alias reload="source ~/.zshrc"
alias aliases="vim ~/.zshrc"
alias hosts="sudo mvim /private/etc/hosts"
# curl shortcuts
alias get="curl -X GET -H \"Content-Type: application/json\""
alias post="curl -X POST -H \"Content-Type: application/json\" -d"
alias patch="curl -X PATCH -H \"Content-Type: application/json\" -d"
alias put="curl -X PUT -H \"Content-Type: application/json\" -d"
alias delete="curl -X DELETE -H \"Content-Type: application/json\""
# dev shortcuts
alias r="yarn run --non-interactive"
# docker
alias d='/usr/local/bin/docker'
alias dc='/usr/local/bin/docker-compose'
# This is Git's per-user configuration file.
[user]
name = Cezary Wojtkowski
email = cezary@gmail.com
[color]
ui = auto
[alias]
st = status
ci = commit
br = branch
co = checkout
f = fetch
# status, show short + branch info
s = status -sb
# diff, shows diff between words
df = diff --word-diff
# diff cache, shows diff between words in staged files
dc = diff --word-diff --cached
# add all, add changes from all tracked and untracked files
aa = add -A
# add patch, select hunks interactively
ap = add -p
# history, show oneline summaries of last 15 commits
h = log --pretty=oneline --abbrev-commit --max-count=15
# undo, undoes last commit
undo = reset --soft HEAD~
# brcu - clean up branches, deletes all except current
brcu = "!f(){\
git branch | grep -v '^*' | xargs git branch -D;\
}; f"
[push]
default = current
[help]
autocorrect = 1
[core]
attributesfile = ~/.gitattributes%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment