My .*rc configuration files

.bashrc 4.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. source /etc/bash.bashrc
  2. export GOROOT="/usr/local/go"
  3. export GOPATH="$HOME/go"
  4. export EDITOR="vim"
  5. # Path
  6. export PATH="$PATH:/usr/local/bin/matlab"
  7. export PATH="/usr/sbin:/sbin:/bin:/usr/games:$PATH"
  8. export PATH="$HOME/.cargo/bin:$PATH"
  9. export PATH="$HOME/.bin:$PATH"
  10. export PATH="$GOROOT/bin:$PATH"
  11. export PATH="$GOPATH/bin:$PATH"
  12. export PATH="$PATH:/bin"
  13. export PATH="$PATH:/home/brendan/.gem/ruby/2.5.0/bin"
  14. export PATH="$PATH:/home/brendan/terraform"
  15. # Shortcuts
  16. alias matlab="/usr/local/bin/matlab/matlab"
  17. alias spaces2tab='grep -Er "*+" --exclude-dir={.git,node_modules,vendor} --exclude="*.yml" --exclude="*.md" --exclude=".gitignore" | grep ":" | cut -d":" -f1 | sort -u | xargs sed -Ei "s/^ /\t/"'
  18. alias vpn='sudo openvpn --config ~/Documents/ccrypto-nl-tcp.ovpn.ovpn'
  19. alias pitivi='optirun flatpak run org.pitivi.Pitivi//stable'
  20. alias ffupdate='pacaur -S --noconfirm --noedit firefox-always-nightly'
  21. alias update='yaourt -Syua --noconfirm --ignore java-testng --ignore javahelp2 --ignore jgraphx --ignore scilab --ignore firefox-always-nightly --ignore postgresql --ignore postgresql-libs'
  22. alias backuphome='rsync --links --recursive --progress --exclude=".cache" $HOME/*'
  23. alias new-gb-project='mkdir src vendor bin pkg && git init && echo -e "_test\nbin\npkg\nvendor/src\nconfig.yaml\n*.db" > .gitignore'
  24. alias gocode-lookup='gocode set package-lookup-mode'
  25. alias osspawns1='openstack server create --key-name brendan --flavor eeb4ccc9-faa0-4afb-955e-6a0224f93055 --image 839d5704-2e75-481f-85d1-86cb07ef6ba4'
  26. alias osspawns1-ubuntu1604='openstack server create --key-name brendan --flavor eeb4ccc9-faa0-4afb-955e-6a0224f93055 --image 71b02300-b1d3-4956-bd5b-b99f3134fd10'
  27. alias osssh='openstack server ssh -4 --login brendan --private'
  28. alias osssh-ubuntu='openstack server ssh -4 --login ubuntu --private'
  29. alias l='ls'
  30. alias ll='ls -l --color=always'
  31. alias lll='ls -lisha --color=always'
  32. alias la='ls -la'
  33. alias ga='git add'
  34. alias gs='git status'
  35. alias gd='git diff'
  36. alias gc='git commit'
  37. alias gcm='git commit -m'
  38. alias gcSm='git commit -S -m'
  39. alias gcSam='git commit -S -am'
  40. alias gr='git rm'
  41. alias gco='git checkout'
  42. alias gl="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all"
  43. alias gps='git push'
  44. alias gpl='git pull'
  45. alias s='sudo systemctl'
  46. alias log='sudo journalctl -u'
  47. alias logf='sudo journalctl -fu'
  48. #source /usr/share/nvm/init-nvm.sh
  49. alias nv7="nvm use --delete-prefix v7.10"
  50. # Matrix
  51. alias goneb="cd ~/Documents/matrix/go-neb && BIND_ADDRESS=:4050 BASE_URL=http://localhost:4050 DATABASE_TYPE=sqlite3 DATABASE_URL=go-neb.db?_busy_timeout=5000 bin/go-neb"
  52. ## Dendrite
  53. alias kafstart="/home/brendan/Documents/matrix/dendrite/kafka/bin/kafka-server-start.sh -daemon /home/brendan/Documents/matrix/dendrite/kafka/config/server.properties"
  54. alias denproxy='./bin/client-api-proxy \
  55. --bind-address ":8448" \
  56. --sync-api-server-url "http://localhost:7773" \
  57. --client-api-server-url "http://localhost:7771" \
  58. --media-api-server-url "http://localhost:7774" \
  59. --public-rooms-api-server-url "http://localhost:7775" \
  60. --tls-cert _test/federation_cert.pem \
  61. --tls-key _test/federation_key.pem'
  62. alias denmono='./bin/dendrite-monolith-server \
  63. --tls-cert "_test/federation_cert.pem" \
  64. --tls-key "_test/federation_key.pem"'
  65. ## Additional scripts (eg completion)
  66. for f in ~/.local/share/bash/*; do source $f; done
  67. # ROS
  68. if [[ -f /opt/ros/kinetic/setup.bash ]]; then
  69. source /opt/ros/kinetic/setup.bash
  70. source ~/catkin_ws/devel/setup.bash
  71. fi
  72. # Prompt
  73. function parse_git_dirty {
  74. [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*"
  75. }
  76. function parse_git_branch {
  77. git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\(\1$(parse_git_dirty)\)/"
  78. }
  79. COLOR_NONE='\[\e[00m\]'
  80. COLOR_LCYAN='\[\e[01;36m\]'
  81. COLOR_LYELLOW='\[\e[01;33m\]'
  82. COLOR_LMAGENTA='\[\e[01;35m\]'
  83. COLOR_LGRAY='\[\e[01;37m\]'
  84. PS1="${COLOR_LGRAY}[\t] ${COLOR_LCYAN}\u@\H${COLOR_NONE}:${COLOR_LMAGENTA}\w${COLOR_NONE} ${COLOR_LYELLOW}\$(parse_git_branch)${COLOR_NONE}$ "
  85. # Tilix VTE stuff
  86. if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
  87. source /etc/profile.d/vte.sh
  88. fi
  89. # Use bash-completion, if available
  90. [[ $PS1 && -f /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
  91. eval "$(direnv hook bash)"