Skip to content

Instantly share code, notes, and snippets.

@stampycode
Last active May 20, 2016 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stampycode/d2c963c65fb2eb7af165 to your computer and use it in GitHub Desktop.
Save stampycode/d2c963c65fb2eb7af165 to your computer and use it in GitHub Desktop.
The .bashrc file I use every day. Customise the prompt, add colours and feedback for usability.
# Prevent terminal specfic alterations being made or output if the session is running in TTY mode
[[ -t 1 ]] || return
# ~/.bashrc
PS1="$(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;32m\]\u@\h'; fi)\[\033[01;34m\] \w \$([[ \$? != 0 ]] && echo \"\[\033[01;31m\]:(\[\033[01;34m\] \")\\$\[\033[00m\] "
HISTSIZE=1000000
alias rs="screen -dR"
alias sshauth="eval \"\$(ssh-agent)\" && ssh-add -t 600 ~/.ssh/id_rsa"
cho "
\`\`\`
oyy+
\`oyyo \`\`\`
.oyyyyysss/\`oyyyyyyyysso- .+oyyyyyo:
-yyyo++oyyyy :syyyyy+///:\` \`yyyys:/oyyo
.yyy+:--:yyo +yys \`syyy:\`-:yyy
/osoyyyyyy+\` yyyy .. \`+yyyyyyyyyy
/yy- \` .+yyo .yyyy. -syy+syys:-..\`syy\` 'rs' to resume screen session
:yyy/://+yyy: +yyys/syyy.yyy/-.-:syyyss/ 'sshauth' to bind key credentials to session
:yyysyyyys+. \`+yyyyyyy/ .oyyyyyyo+syyo. 'ovpn' to connect to OpenVPN
-:..\` ...\` ./::-. \`\`\`\`\`\` \`\`\`.\` 'dockerclean' to clean unused docker images
-sysoyyyysyyyy- -osss+/+syys+- .sssyyyys/yyyyyyy\` eval \$(docker-machine env default)
./yyyyoyyyysyyy\`\`:+syyyy///yyyo\`/++yyy+.\`/yyyo/:
yyy:.yyy::yyy +yy/ oyy: :yys\` +yyo
.yyy..yyy\`:yyy oyy- \`yyo /yys+yys
yyy:\`yyy\`.yys /yy: /yy: oyyyyy\`
\`/yyyo/yyy+oyyys- :yyy+:-:oyy+ \`syyy.
-yyyyoooso+oyyyy+ /yy+syyyyo- -+o+- oyy/
+yy \`\` \`yyyyysyy+
\`+oyyyso. /yyyyyy+
\`:++//+/. ./+o+-
"
export NVM_DIR="~/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
# add entries to bash history as you run them
export PROMPT_COMMAND='history -a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment