Last active
May 3, 2017 09:47
-
-
Save alyssaq/13343be24580c341b425 to your computer and use it in GitHub Desktop.
.bash_profile
This file contains 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
alias ls="ls -hFG" | |
alias ll="ls -lAhBG" | |
alias pyserver="python -m SimpleHTTPServer 2000" | |
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl" | |
# Postgres. To use: pgserver [start|stop|status] | |
alias pgserver="pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log" |
This file contains 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
# Terminal | |
export CDPATH=.:~:~/Documents:~/go/src/github.com/: | |
export SHELL=/bin/bash | |
export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd | |
export LC_ALL=en_US.UTF-8 | |
export LANG=en_US.UTF-8 | |
export HISTSIZE=1000000 | |
export HISTFILESIZE=1000000000 | |
export HISTIGNORE="&:ls:exit" | |
export LC_CTYPE=C | |
export LANG=C | |
export GREP_OPTIONS=--color=auto | |
# Virtualenvwrapper | |
export WORKON_HOME=$HOME/.virtualenvs | |
export VIRTUALENVWRAPPER=/usr/local/bin/virtualenvwrapper.sh | |
# Golang | |
export GOPATH=$HOME/go | |
export PATH=$PATH:$GOPATH/bin |
This file contains 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
# Git bash | |
GIT_FOLDER=/usr/local/etc/bash_completion.d | |
if [ -f $GIT_FOLDER/git-completion.bash ]; then | |
source "$GIT_FOLDER/git-completion.bash" | |
fi | |
export GIT_EDITOR="vim" | |
# Git branch in prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\[\033[35m\]\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
# $ brew install bash-completion | |
# $ brew tap homebrew/completions | |
if [ -f $(brew --prefix)/etc/bash_completion ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
# sudo pip install virtualenv | |
# mkdir ~/.virtualenvs | |
# sudo pip install virtualenvwrapper | |
if [ -e /usr/local/bin/virtualenvwrapper.sh ]; then | |
source /usr/local/bin/virtualenvwrapper.sh | |
fi | |
if [ -e ~/.bash_exports ]; then | |
source ~/.bash_exports | |
fi | |
if [ -e ~/.bash_alias ]; then | |
source ~/.bash_alias | |
fi | |
if [ -e bash_completion_tmux.sh ]; then | |
source ./bash_completion_tmux.sh | |
fi | |
export PATH=$PATH:/Users/alyssa/Documents/stuff/scripts | |
# Add tab completion for known SSH hostnames | |
complete -W "$(echo `cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\["`;)" ssh | |
# SSH Agent | |
SSH_ENV="$HOME/.ssh/environment" | |
function start_agent { | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" | |
chmod 600 "${SSH_ENV}" | |
. "${SSH_ENV}" > /dev/null | |
ssh-add | |
} | |
# Source SSH settings, if applicable | |
if [ -f "${SSH_ENV}" ]; then | |
. "${SSH_ENV}" > /dev/null | |
ps -ef | grep ${SSH_AGENT_PID} | grep ssh-agent$ > /dev/null || { | |
start_agent | |
} | |
else | |
start_agent | |
fi |
This file contains 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
[user] | |
name = alyssaq | |
email = <> | |
[core] | |
editor = /usr/bin/vim | |
excludesfile = ~/.gitignore_global | |
whitespace = space-before-tab,-indent-with-non-tab,trailing-space | |
trustctime = false | |
precomposeunicode = false | |
[push] | |
default = simple | |
[grep] | |
lineNumber = true | |
[color "diff"] | |
meta = yellow | |
frag = magenta # line info | |
[color "status"] | |
added = yellow | |
untracked = cyan | |
[rebase] | |
autoStash = true | |
autoSquash = true | |
stat = true | |
[alias] | |
# View abbreviated SHA, description, and history graph of the latest 20 commits | |
l = log --pretty=oneline -n 20 --graph --abbrev-commit | |
# View the current working tree status using the short format | |
s = status -s | |
ls = ls-files | |
co = checkout | |
st = status | |
ca = commit --amend |
This file contains 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
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
"\e[A": history-search-backward | |
"\e[B": history-search-forward | |
"\e[C": forward-char | |
"\e[D": backward-char |
This file contains 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
# Allow mouse clicks | |
set -g mouse on | |
# reload config | |
unbind r | |
bind r source-file ~/.tmux.conf \; display-message "Config reloaded..." | |
# Allow mouse clicks | |
set -g mouse on | |
# color | |
set -g default-terminal "screen-256color" | |
# pane creation shortcuts | |
unbind % | |
bind h split-window -h | |
bind m split-window -h \; split-window -h \; select-layout even-horizontal | |
# https://github.com/ChrisJohnsen/tmux-MacOSX-pasteboard | |
set-option -g default-command "reattach-to-user-namespace -l bash" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment