Last active
June 11, 2021 20:52
-
-
Save seanvaleo/fdf29b00824e8b39e07b0ee8b9a9eb8d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac | |
# Don't put duplicate lines or lines starting with space in the history | |
HISTCONTROL=ignoreboth | |
# Append to the history file, don't overwrite it | |
shopt -s histappend | |
# Set longer history length | |
HISTSIZE=1000 | |
HISTFILESIZE=2000 | |
# Check the window size after each command and, if necessary, | |
# update the values of LINES and COLUMNS. | |
shopt -s checkwinsize | |
# Make less more friendly for non-text input files, see lesspipe(1) | |
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" | |
# Set variable identifying the chroot you work in (used in the prompt below) | |
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then | |
debian_chroot=$(cat /etc/debian_chroot) | |
fi | |
# If this is an xterm set the title to user@host:dir | |
case "$TERM" in | |
xterm*|rxvt*) | |
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" | |
;; | |
*) | |
;; | |
esac | |
# Color Support | |
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
fi | |
# Add an "alert" alias for long running commands. Use like so: | |
# sleep 10; alert | |
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' | |
# Bash completion | |
if ! shopt -oq posix; then | |
if [ -f /usr/share/bash-completion/bash_completion ]; then | |
. /usr/share/bash-completion/bash_completion | |
elif [ -f /etc/bash_completion ]; then | |
. /etc/bash_completion | |
fi | |
fi | |
# Alias reload config | |
alias reload='source ~/.bashrc' | |
# Alias 'v' for 'vim' | |
alias v='vim' | |
# Alias 'l' for 'ls -la' with nice output | |
alias l='ls --color -h --group-directories-first -la' | |
# On every 'cd' do an 'l' | |
cd(){ command cd "$1" && l; } | |
# Alias 'cd' to popular directories | |
alias logstream='cd [redacted]' | |
alias appscope='cd ~/dev/src/github.com/criblio/appscope/' | |
# Alias 'vim' popular files | |
alias bashrc='vim ~/.bashrc' | |
alias vimrc='vim ~/.vimrc' | |
# Environment Variables | |
export PATH=$PATH:/usr/local/go/bin | |
export GOPATH=/home/sean/dev | |
export PATH=$GOPATH/bin:$PATH | |
export NODE_OPTIONS="--max-old-space-size=8192" #increase to 8gb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment