export PS1="\n\[\033[1;102m\]\[\033[1;30m\] \A \[\033[1;103m\]\[\033[1;30m\] \u \[\033[0;107m\]\[\033[1;30m\] \w \[\033[0m\] \[\`if [ \$? != 0 ]; then echo 😠 ' '; fi \`\]" alias ls='ls -lhaG' alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..' alias gm="grunt nodemon" alias gish="ssh -T git@github.com" ## Swap your mac address. function macswap() { hexchars="0123456789abcdef"; mac=$( for i in {1..10}; do echo -n ${hexchars:$(( $RANDOM % 16 )):1}; done | sed -e 's/\(..\)/:\1/g'; ) newMAC=00$mac; if sudo ifconfig en0 ether $newMAC then echo -e '\n 👍🏻 Your new MAC address:' $newMAC; else echo -e '\n 👎🏻 I cannot change the MAC address.'; fi echo } ## Git commit, with signature function cosi() { git commit -S -am "$1" } function gipu() { if [ "$1" == "" || "$2" == "" ]; then echo ""; echo " You need to provide a remote and a branch."; echo " Usage: gis {REMOTE} {BRANCH}"; echo ""; else if [ "$3" == "f" ]; then git push $1 $2 --force else git push $1 $2 fi fi } function gipl() { if [ "$1" == "" || "$2" == "" ]; then echo ""; echo " You need to provide a remote and a branch."; echo " Usage: gil {REMOTE} {BRANCH}"; echo ""; else git pull $1 $2 --rebase fi } function gir() { if [ "$1" == "" ]; then echo ""; echo " You need to provide a revision number"; echo " Usage: gir {REVISION NUMBER}"; echo ""; else git rebase -i HEAD~$1 fi } function gif() { git fetch } export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" export GPG_TTY=$(tty)