Last active
October 11, 2023 07:13
-
-
Save firecall/13d2c697fdefc96a408c4fb6f0ed90f5 to your computer and use it in GitHub Desktop.
My .zshrc / bash Profile
This file contains 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
eval "$(/opt/homebrew/bin/brew shellenv)" | |
eval "$(rbenv init -zsh)" | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
export PATH="/opt/homebrew/bin:$PATH" | |
export PATH="/opt/homebrew/sbin:$PATH" | |
#export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH" | |
#export PATH="$(brew --prefix openssl@1.1)/bin:$PATH" | |
#export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl@1.1)" | |
If you need to have openssl@3 first in your PATH, run: | |
echo 'export PATH="/opt/homebrew/opt/openssl@3/bin:$PATH"' >> ~/.zshrc | |
For compilers to find openssl@3 you may need to set: | |
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib" | |
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include" | |
For pkg-config to find openssl@3 you may need to set: | |
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig" | |
export EDITOR="subl -w" | |
#CFLAGS="-Wno-error=implicit-function-declaration" rbenv install 2.7.1 | |
#Quality of Life | |
alias ls='ls -F' | |
alias ll='ls -la' | |
alias lh='ls -lh' | |
alias lt='ls --human-readable --size -1 -S --classify' | |
alias left='ls -t -1' | |
alias path="echo $PATH | tr ':' '\n'" | |
#alias reload="source ~/.zshrc" | |
alias reload="source ~/.zprofile" | |
alias ytdl="youtube-dl -x --audio-format mp3 --embed-thumbnail" | |
alias sites="cd ~/Sites/" | |
alias ss="cd ~/Sites/" | |
# Mouse Scaling - Make the mouse tracking faster | |
alias mousescale='defaults read -g com.apple.mouse.scaling' | |
alias mousescale-d='defaults write -g com.apple.mouse.scaling 3.0' | |
alias mousescale-3='defaults write -g com.apple.mouse.scaling 3.0' | |
alias mousescale-4='defaults write -g com.apple.mouse.scaling 4.0' | |
alias mousescale-5='defaults write -g com.apple.mouse.scaling 5.0' | |
alias mousescale-6='defaults write -g com.apple.mouse.scaling 6.0' | |
alias mousescale-7='defaults write -g com.apple.mouse.scaling 7.0' | |
#macOS Admin | |
alias displays="system_profiler SPDisplaysDataType | grep -C1 Resolution" | |
alias htop="sudo htop" | |
alias reboot="sudo fdesetup authrestart" | |
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" | |
alias sup="subl ~/.zshrc" | |
#update URL from NextDNS | |
alias nextdns="curl -s https://link-ip.nextdns.io/" | |
#docker | |
alias dcu="docker compose up" | |
alias dcd="docker compose down" | |
alias dd="docker rm -f $(docker ps -a -q) && docker volume rm $(docker volume ls -q)" | |
#ruby dev | |
alias bi="bundle install" | |
alias bu="bundle update" | |
alias bxc="bundle exec jekyll clean" | |
alias bxb="bundle exec jekyll clean && bundle exec jekyll build" | |
alias bxj="bundle exec jekyll clean && bundle exec jekyll serve --livereload" | |
alias beg="bundle exec guard" | |
alias gwip="git add . && git commit -m 'WIP Commit && git push -u origin master'" | |
alias rdm="rails db:migrate" | |
alias rdo="rails db:rollback" | |
alias rdr="rake db:reseed" | |
alias vma="rails s -p 3001 -b 0.0.0.0" | |
alias vmw="rails s -p 3000 -b 0.0.0.0" | |
alias rsc="rake sync:copy" | |
#Local Production Environment with Static Assets | |
alias rprod="RAILS_SERVE_STATIC_FILES=1 passenger start -a 0.0.0.0 -p 3000 -d -e production" | |
#homebrew | |
alias sm="brew services start mysql" | |
alias stm="brew services stop mysql" | |
alias rsm="brew services restart mysql" | |
#network | |
alias usg="ssh admin@10.0.0.1" | |
alias usglb="ssh admin@10.0.1 'show load-balance status; show load-balance watchdog'" | |
alias cleardns="dscacheutil -flushcache" | |
alias flushdns="dscacheutil -flushcache" | |
alias killdns="sudo killall -HUP mDNSResponder" | |
alias myip="host myip.opendns.com resolver1.opendns.com" | |
alias pingabb="ping -i 5 aussiebroadband.com.au | xargs -L 1 -I '{}' date '+%Y-%m-%d %H:%M:%S: {}' | tee -a ~/Desktop/abb-ping-tests.txt" | |
alias plabb="ping -c 25 aussiebroadband.com.au | xargs -L 1 -I '{}' date '+%Y-%m-%d %H:%M:%S: {}' | tee -a ~/Desktop/abb-packetloss-tests.txt" | |
alias tailscale="/Applications/Tailscale.app/Contents/MacOS/Tailscale" | |
# export PATH="$HOME/.rbenv/bin:$PATH" | |
# export LDFLAGS="-L/usr/local/opt/ruby/lib" | |
# export CPPFLAGS="-I/usr/local/opt/ruby/include" | |
# export PATH="/usr/local/opt/openssl@1.1/bin:$PATH" | |
# PS1='\u@\h:\w\$ ' | |
# export PS1='\[\e[0;36m\]\u\[\e[0m\]@\[\e[0;33m\]\h\[\e[0m\]:\[\e[0;35m\]\w\[\e[0m\]\$ ' | |
# export PS1="[\e[1;33m\u\e[m@\e[1;36m\h\e[m] [\$(date +%k:%M:%S)]\n\e[0;32m[\w]\e[m \n\$ " | |
export PS1="[\e[0;36m\u\e[m@\e[0;33m\h\e[m] [\$(date +%k:%M:%S)]\n\e[0;31m[\w]\e[m \n\$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment