Skip to content

Instantly share code, notes, and snippets.

@dominikwilkowski
Last active May 18, 2025 23:55
Show Gist options
  • Save dominikwilkowski/49380fed2e37666bddb524fc2a296bd2 to your computer and use it in GitHub Desktop.
Save dominikwilkowski/49380fed2e37666bddb524fc2a296bd2 to your computer and use it in GitHub Desktop.
My zsh dot file
source ~/.profile
# default editor
export EDITOR=vim
# GPT API key for "git busy" command
export GPT_API_KEY=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
# homebrew PATH
eval "$(/opt/homebrew/bin/brew shellenv)"
# path for pyenv (python version manager)
eval "$(pyenv init --path)"
# subl command
export PATH="/Applications/Sublime Text.app/Contents/SharedSupport/bin:$PATH"
export PATH=/usr/local/bin:$PATH
export PATH=/Users/dominik/.local/bin:$PATH
# prompt colors https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html#Prompt-Expansion
export PS1='%F{green}%~%f λ '
# https://blog.akatz.org/fixing-macos-zsh-terminal-history-settings/
alias history="history 1"
HISTSIZE=99999
HISTFILESIZE=99999
SAVEHIST=$HISTSIZE
# ls alias for color-mode
alias ll='ls -lhaG $@'
# unalias ls
# cd up
alias ..='cd ..'
# get ip
alias ip='ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d \ -f 2'
# more details
alias ip2="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'"
# refresh shell
alias reload='source ~/.zprofile'
alias refresh='source ~/.zprofile'
# open current folder in Finder
alias f='open -a Finder ./'
# recursive dir listing
alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'' | less'
# start apache
alias astart='sudo apachectl start'
# start server from current dir
alias serve='python -m SimpleHTTPServer 8000'
# kill video
alias killVideo='sudo killall VDCAssistant'
# NVM globals
export NVM_DIR="$HOME/.nvm"
[ -s "$(brew --prefix)/opt/nvm/nvm.sh" ] && . "$(brew --prefix)/opt/nvm/nvm.sh" # This loads nvm
[ -s "$(brew --prefix)/opt/nvm/etc/bash_completion.d/nvm" ] && . "$(brew --prefix)/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion
# rbenv ruby version manager https://github.com/rbenv/rbenv
# eval "$(rbenv init -)"
##
# Your previous /Users/dominik/.zprofile file was backed up as /Users/dominik/.zprofile.macports-saved_2022-05-30_at_12:22:27
##
# MacPorts Installer addition on 2022-05-30_at_12:22:27: adding an appropriate PATH variable for use with MacPorts.
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.
# MacPorts Installer addition on 2022-05-30_at_12:22:27: adding an appropriate MANPATH variable for use with MacPorts.
export MANPATH="/opt/local/share/man:$MANPATH"
# Finished adapting your MANPATH environment variable for use with MacPorts.
# postgres psql
export PATH="/opt/homebrew/opt/libpq/bin:$PATH"
# ruby
source $(brew --prefix)/opt/chruby/share/chruby/chruby.sh
source $(brew --prefix)/opt/chruby/share/chruby/auto.sh
chruby ruby-3.3.5
# upgrade
alias upgrade='echo "\x1B[43m\x1B[30m $(date +"%Y-%B-%d %H:%M:%S") \x1B[0m" && rustup update && brew upgrade'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment