daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Aug 13th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # .bashrc
  2.  
  3. # Source global definitions
  4. if [ -f /etc/bashrc ]; then
  5.     . /etc/bashrc
  6. fi
  7.  
  8. # Uncomment the following line if you don't like systemctl's auto-paging feature:
  9. # export SYSTEMD_PAGER=
  10.  
  11. # User specific aliases and functions
  12.  
  13. ####### chivato del GIT
  14. function parse_git_dirty {
  15.  git diff --quiet HEAD &>/dev/null
  16.  [[ $? == 1 ]] && echo "⚡"
  17. }
  18.  
  19. git_branch() {
  20.  BRANCH=$(git branch 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/(\1)/")
  21.  echo "$BRANCH"
  22. }
  23.  
  24. ##### helpers de dot
  25. ####  ex: go_render myfile.dot &
  26.  
  27. function get_mtime {
  28.   ls -l --time-style=+%s "${1?}" |  cut -d' ' -f6
  29. }
  30.  
  31. function go_render {
  32.   dotfile="$1"
  33.   mtime=0
  34.   while true;
  35.   do
  36.     newtime=$(get_mtime "$dotfile")
  37.     test $mtime -ne $newtime && dot -O -Tpng $dotfile;
  38.     mtime=$newtime
  39.     sleep 1;
  40.   done;
  41. }
  42. #######
  43.  
  44. # joder ya con la dislexia !!
  45. alias gti="git"
  46. alias got="git"
  47. alias tit="git"  # yeah
  48.  
  49. # vim con poderes
  50. alias vim="vimx"
  51.  
  52. ######## golang stuff
  53. function letsgo {
  54.   export GOPATH=$PWD
  55.   export GOBIN=$PWD/bin
  56.   export PATH=$GOBIN:$PATH
  57.   export GOROOT=$(go env GOROOT)
  58. }
  59. function ingopath {
  60.   [[ $PWD == "$(go env GOPATH)"* ]] && echo "(👀)"
  61. }
  62.  
  63. # prompt
  64. export PS1='\[\033[01;37m\]\w\[\033[00;36m\]$(ingopath)\[\033[01;33m\]$(git_branch)\[\033[01;91m\]$(parse_git_dirty)\[\033[01;30m\] $(date +%M%S)\[\033[00m\] $ '
  65.  
  66. export PROJECTS_PATH="$HOME/Documentos"
  67.  
  68. . $HOME/.asdf/asdf.sh
  69. . $HOME/.asdf/completions/asdf.bash
  70.  
  71. export ERL_AFLAGS="-kernel shell_history enabled"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top