Created
September 3, 2021 11:39
-
-
Save dr5hn/d29f06a211ce9eba4e417bf6e8a6f9a0 to your computer and use it in GitHub Desktop.
Useful Aliases & .zProfile config
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
# Sourced upon login | |
eval $(/opt/homebrew/bin/brew shellenv) | |
# Setup Compiler paths for readline and openssl | |
local READLINE_PATH=$(brew --prefix readline) | |
local OPENSSL_PATH=$(brew --prefix [email protected]) | |
export LDFLAGS="-L$READLINE_PATH/lib -L$OPENSSL_PATH/lib" | |
export CPPFLAGS="-I$READLINE_PATH/include -I$OPENSSL_PATH/include" | |
export PKG_CONFIG_PATH="$READLINE_PATH/lib/pkgconfig:$OPENSSL_PATH/lib/pkgconfig" | |
# Use the OpenSSL from Homebrew instead of ruby-build | |
# Note: the Homebrew version gets updated, the ruby-build version doesn't | |
export RUBY_CONFIGURE_OPTS="--with-openssl-dir=$OPENSSL_PATH" | |
# Place [email protected] at the beginning of your PATH (preempt system libs) | |
export PATH=$OPENSSL_PATH/bin:$PATH | |
# Load rbenv | |
eval "$(rbenv init -)" | |
# Extract the latest version of Ruby so you can do this: | |
# rbenv install $LATEST_RUBY_VERSION | |
# export LATEST_RUBY_VERSION=$(rbenv install -l | grep -v - | tail -1) | |
######### | |
# Utilities | |
######### | |
alias flush="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder" | |
alias ..="cd .." | |
alias cd..="cd .." | |
alias mkdir="mkdir -pv" | |
alias wget="wget -c" | |
alias myip="curl http://ipecho.net/plain; echo" | |
alias edithosts="sudo nano /private/etc/hosts" | |
#################### | |
# Composer Aliases | |
#################### | |
alias ci="composer2 install" | |
alias cu="composer2 update" | |
alias co="composer2 outdated" | |
alias cr="composer2 require" | |
alias crm="composer2 remove" | |
############# | |
# Git Aliases | |
############# | |
alias gs="git status -sb" | |
alias ga="git add" | |
alias gb="git branch" | |
alias gca="git commit -a" | |
alias gcm="git commit -m" | |
alias gcam="git commit -a -m" | |
alias gd="git diff" | |
alias gitsync="git fetch && git pull" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment