Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
76 lines (61 sloc) 2.15 KB
# MOTD
# Nick ascii generated with 'http://patorjk.com/software/taag/'
echo '
██████╗ ███████╗██╗ ██╗██╗
██╔══██╗██╔════╝██║ ██╔╝██║
██████╔╝███████╗█████╔╝ ██║
██╔═══╝ ╚════██║██╔═██╗ ██║
██║ ███████║██║ ██╗███████╗
╚═╝ ╚══════╝╚═╝ ╚═╝╚══════╝
' | lolcat
# set git config globally
# automatically push to matching branch name remotely
git config --global push.default current
# Workaround the fact that pull.default doesnt exist
function pull(){
local BRANCH_NAME=`git branch --no-color | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
git pull origin $BRANCH_NAME
}
# Clean git branches
function clean_branches(){
git branch | xargs git branch -D
}
# Print IP
alias ip="curl -s http://checkip.dyndns.org/ | sed 's/[a-zA-Z<>/ :]//g'"
# Remove DS_Store files recursively from the current folder
alias remove_ds_store="find . -name '*.DS_Store' -type f -delete"
# Command to fix shit and force push the changes
# requires the git config to be set like that : `git config push.default current`
function try_again(){
git add -A
git commit --amend --no-edit
git push -f
}
# Rebase current branch on dev
function rebase(){
echo 'rebasing your branch on dev 💯'
git pull --rebase origin dev
}
# Open a terminal in the docker container
alias bash='dock-compose exec api bash'
# Enable alt + arrow cursor movements
bindkey "[D" backward-word
bindkey "[C" forward-word
# Other variables
export ZSH=/Users/pascal/.oh-my-zsh
ZSH_THEME="robbyrussell"
DISABLE_AUTO_UPDATE="true"
ENABLE_CORRECTION="false"
COMPLETION_WAITING_DOTS="true"
plugins=(git)
source $ZSH/oh-my-zsh.sh
# ssh
export SSH_KEY_PATH="~/.ssh/id_rsa"
# editor for editing commits, kinda weird
export EDITOR=/usr/bin/vim
# RBenv to manage ruby versions
eval "$(rbenv init -)"
# Load private functions if exists
# source ~/.privaterc
# Postgres.app
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.6/bin
You can’t perform that action at this time.