Skip to content

Commit

Permalink
Initial commit of dotfile nonsense. Gotta fix some of these
Browse files Browse the repository at this point in the history
  • Loading branch information
Popsiclestick committed Aug 17, 2018
0 parents commit 6d6f455
Show file tree
Hide file tree
Showing 5 changed files with 3,022 additions and 0 deletions.
23 changes: 23 additions & 0 deletions bash_profile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# Golang
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:/usr/lib/go-1.10/bin"

# History
PROMPT_COMMAND='history -a;history -n'

# LS Colors
LS_COLORS='no=00:fi=00:di=34:ln=00;35:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;36;40:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:'
export PATH LS_COLORS

echo -e '\033k'$HOSTNAME'\033\\'

# Show hostname on tmux status line
case "$TERM" in
screen*) TERM='screen'; printf "\033k${HOSTNAME}\033\\";
esac
80 changes: 80 additions & 0 deletions bashrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Aliases
alias c='clear'
alias ..='cd ..'
alias sudo='sudo '
alias br='. ~/.bashrc'
alias ipp="curl -w '\n' https://canihazip.com/s"
alias grep='grep --color=auto'
alias sr="source ~/.bashrc"
alias st="tmux source-file ~/.tmux.conf"
alias nett='lsof -n -i4TCP | grep LISTEN'
alias cdgo='cd ~/go/src/'

# Server Aliases

#ls & tail aliases
alias ls='ls -CFG'
alias ll='ls -la'
alias tf='tail -F'
alias tf10='tail -10f'
alias tf100='tail -100f'
alias tf500='tail -500f'
alias tf1000='tail -1000f'
alias t='tail'
alias t10='tail -10'
alias t100='tail -100'
alias t500='tail -500'
alias t1000='tail -1000'

# Git aliases
alias gs="git status"
alias gb="git branch"
alias gitpp='git pull && git push'

# Shopt
shopt -s autocd
shopt -s cdspell
shopt -s checkwinsize
shopt -s histappend

# Extras
HISTCONTROL=ignoredups:ignorespace
HISTSIZE=
HISTFILESIZE=
export EDITOR='/usr/bin/vim'
export VISUAL='/usr/bin/vim'

# Git Prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

# Prompt
if [[ $- == *i* ]]; then
export PS1="\[$(tput setaf 2)\][\u\[$(tput setaf 5)\]@\[$(tput setaf 2)\]\h]\[$(tput setaf 5)\] in \[$(tput setaf 2)\]\w\[$(tput setaf 7)\]\$(parse_git_branch)\[$(tput setaf 5)\] at\[$(tput setaf 2)\] \D{%Y-%m-%d} \[$(tput setaf 5)\]\t\n:; \[$(tput sgr0)\]"
fi

# Extracts most known archives with one command
extract () {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' cannot be extracted via extract()" ;;
esac
else
echo "'$1' is not a valid file"
fi
}

# Git Completion
test -f ~/.git-completion.bash && . $_
Loading

0 comments on commit 6d6f455

Please sign in to comment.