Skip to content

Instantly share code, notes, and snippets.

@jbszczepaniak
Created October 29, 2017 13:04
Show Gist options
  • Save jbszczepaniak/82344ea8b5556370e5689fccc92c393c to your computer and use it in GitHub Desktop.
Save jbszczepaniak/82344ea8b5556370e5689fccc92c393c to your computer and use it in GitHub Desktop.
My aliases and settings.
# git
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\$(date +%H:%M:%S) \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] πŸš€πŸš€πŸš€ "
if [ -f $(brew --prefix)/etc/bash_completion ]; then
$(brew --prefix)/etc/bash_completion
fi
alias gs="git status"
alias gcom="git commit"
# docker
alias dckr_ips='docker inspect --format='"'"'{{range $net, $conf := .NetworkSettings.Networks}}{{$net}}: {{$conf.IPAddress}}, {{end}}'"'"''
alias dckr_stop_all='docker stop $(docker ps -aq)'
alias dckr_rm_all='docker rm $(docker ps -aq)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment