dev config
.zsh dotfiles
Scripts go in ~/.scripts
, which I add to my path.
Some of my favorite parts
Jump to directory by searching history using zoxide
z () { z "$@" }
# also open in your default editor
ze () {z $1 && edit }
Quick docker-compose with automatic file detection
dc() {
open -a "OrbStack"
if [[ -f "$1" ]]; then
docker-compose -f "$1" "${2:-up}" "${@:2}"
elif [[ -d "$1" ]]; then
docker-compose -f "$1/docker-compose.yml" "${2:-up}" "${@:2}"
else
docker-compose "${1:-up}" "$@"
fi
}
Quick network tools
ip() { curl -sS ipinfo.io | jq '{ip:.ip, city:.city, country:.country}' }
# {
# "ip": "147.209.170.11",
# "city": "Townsville",
# "country": "AU"
# }
port() { lsof -ti:$1 }
killport() { lsof -ti:$1 | xargs kill }
alias flushdns='dscacheutil -flushcache'
global config files
ruff ~/Library/Application Support/ruff/ruff.toml
indent-style = "tab"
line-length = 110