Skip to content

Instantly share code, notes, and snippets.

@dominikwilkowski
Created November 24, 2021 00:57
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 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
# homebrew PATH
eval "$(/opt/homebrew/bin/brew shellenv)"
# subl command
export PATH="/Applications/Sublime Text.app/Contents/SharedSupport/bin:$PATH"
export PATH=/usr/local/bin:$PATH
# prompt colors https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html#Prompt-Expansion
export PS1='%F{green}%~%f λ '
# 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 -)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment