Skip to content

Instantly share code, notes, and snippets.

@weblogix
Last active June 14, 2017 11:48
Show Gist options
  • Save weblogix/8fd1934677a58eee99b62d03d694abf0 to your computer and use it in GitHub Desktop.
Save weblogix/8fd1934677a58eee99b62d03d694abf0 to your computer and use it in GitHub Desktop.
.bash_profile for my local development machine
# Defaults
export VISUAL=nano
# Aliases
alias c='clear'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
# copy the working directory path
alias cpwd='pwd|tr -d "\n"|pbcopy'
## Colorize the grep command output for ease of use (good for log files)##
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# Networking
alias ports='netstat -tulan'
alias ip="curl icanhazip.com"
# Permissions
alias chx='chmod 755' #executable
alias chr='chmod 644' #read and write
alias ax="chmod a+x" #executable
# Docker stuff
alias di='docker image'
alias dc='docker-compose'
# Git stuff
# scm_breeze - https://github.com/scmbreeze/scm_breeze
[ -s "/Users/randy/.scm_breeze/scm_breeze.sh" ] && source "/Users/randy/.scm_breeze/scm_breeze.sh"
# bash-git-prompt - https://github.com/magicmonty/bash-git-prompt
if [ -f "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh" ]; then
__GIT_PROMPT_DIR=$(brew --prefix)/opt/bash-git-prompt/share
source "$(brew --prefix)/opt/bash-git-prompt/share/gitprompt.sh"
fi
#Git alias
alias g='git'
alias g_conflict_view='g diff --name-only --diff-filter=U'
# System shortcuts
alias ddd='pmset displaysleepnow'
alias zzz='pmset sleepnow'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment