PMHPTL5RUFWZWMOTA6LKNS5I42EI6VMHCGEQBE5ZGOQYCAXWXQOAC 7S723KBOAGTNAAHZNYJR7OXJ2F4WXIOFF23CCIVHQNNUBQBJ5WRAC BX6TV7XWLRYKA36CVPFL7RJFV3QWDFBH5XP4PXLB72JXWBAAJCNQC 5FLTMCXWFLP6MI36R73NDC5ZZGKRB66IXOWY7ZTESTLC7M357H2QC 2WCOODWOS4Q63X6PGYX5VLOP5W7Y77YBPYYHBWAWSVFTA476FQZAC XPYTDFC3JLNLAYYJ5PILP2LFNKZBQSXHELWRLNZNJ7GTBBWXPRGAC VB7SQS5KNBIK4CZJNWV2C7OV3XJYIFORVQR4EXCWECPQGLDOZ3AQC OWIWYLD3QNPLTVMX5SBJA7474PD4RTYNGRFLF2TNKOIKQ4E2V5BQC ROVHTSWG6NTPZWVGLUGSGSUHKZDKZ7U2R2XET4KNLG67WFSB3TMAC XPRFKBOMSZVTDHISLXEWWSJ4XSMLAACMWVUTXDM6QDLAJKA7GDVQC A2FIR5BWCAVNXUFPIMO3A66M7VGYB4FL667QWVF7F22TBIVVYWVAC 7KXKJ2Z7GX7L5PUURMJDAHVZS25BMYHPYI7ZNMLZ4COHMW4EBXKAC " vim-test configlet test#strategy = "neovim" " runs test in :term instead of :!" -- Normal Mode Remapsnnoremap <leader>r :call NumberToggle()<cr>nnoremap <leader>j :bn<ENTER>nnoremap <leader>k :bp<ENTER>nnoremap <leader>T :vsplit term://bash<ENTER>a. ~/.bash_profile<ENTER>nnoremap <leader>Th :sp term://bash<ENTER>a. ~/.bash_profile<ENTER>nnoremap <leader>tt :TestFile<ENTER>
colorscheme nova
" -- highlight trailing whitespace and tab characters in redhighlight ExtraWhitespace ctermbg=red guibg=redmatch ExtraWhitespace /\s\+$\|\t/"###FUNCTIONS###"###############function! NumberToggle()if(&relativenumber == 1)set nornuset numberelseset rnuendifendfunc
set -o vi# swift repl fix - due to brew python being at the front of $PATH variablealias swift="PATH=/usr/bin:$PATH swift"# set mysql to the brew install pathalias mysql=/usr/local/mysql/bin/mysqlalias mysqladmin=/usr/local/mysql/bin/mysqladmin############################## Enable fzf key bindings#############################[ -f ~/.fzf.bash ] && source ~/.fzf.bash# use ag not find commandexport FZF_DEFAULT_COMMAND='ag -g ""'export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"_fzf_compgen_path() {ag -g "" "$1"}###################### GENERAL USE ALIASES#####################alias cp='cp -iv' # copy a file with the verbose and warning flagsalias mv='mv -iv' # move a file/dir with verbose and warning flagsalias mkdir='mkdir -pv' # make directory with the path and verbose flagsalias cd..='cd ../' # Go back 1 directory levelalias finder='open -a Finder ./' # Open current directory in MacOS Finderalias path='echo -e ${PATH//:/\\n}' # Echo all executable Pathsalias numFiles='echo $(ls -1 | wc -l)' # Count of non-hidden files in current diralias staticip='dig +short myip.opendns.com @resolver1.opendns.com' # get the static ip of the current networkalias vim=nvim # use neovim instead of vim# lr is a full recursive directory listing piped to lessalias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'' | less'#################### QUICK NAV Aliases###################export GOCODE=$GOPATH/src/github.com/mistahchris/######################## GENERAL USE FUNCTIONS######################## sets up the terminal to make working on a project easyworkon () {project=$1case $project in"eventbrite"*)cd $EBPATH;;"fastfile"*)cd /Users/ccummings/eventbrite_github/triage_projects/jira_modal;;"data_nerds"*)cd /Users/ccummings/mistahchris_github/data_nerds/pyenv activate data_nerds;;"tableau_help"*)cd /Users/ccummings/tableau_helpsource ./private/config_vars.shsource ./.profile.d/000-react-app-exports.sh;;esac}# Always list directory contents after 'cd'cd () {builtin cd "$@"; ls -a;}# moves a file to the macOS Trashtrash () {command mv "$@" ~/.Trash ;}# opens a file in the macOS previewpreview () {qlmanage -p "$*" >& /dev/null;}# creates a zip archive folderzipf () {zip -r "$1".zip "$1" ;}# make a directory and change into itmcd () {mkdir -p $1;cd $1;}calc () {echo "print($@)" | python3}# cdfinder changes the directory to the frontmost open finder windowcdfinder () {currFolderPath=$( /usr/bin/osascript <<EOTtell application "Finder"tryset currFolder to (folder of the front window as alias)on errorset currFolder to (path to desktop folder as alias)end tryPOSIX path of currFolderend tellEOT)echo "cd to \"$currFolderPath\""cd "$currFolderPath"}# sets the contents of a file to the macOS clipboardcopy () {cat $1 | pbcopy}# kill a process by namedie () {name=$1firstChar=${name:0:1}rest=${name:1:${#name}}pid=`ps aux | grep "[$firstChar]$rest" | awk '{print $2}'`kill $pid}# extracts the git branch nameparseBranch() {git branch | grep "^\* " | sed "s/\* //g"}# pullall iterates through each immediate child directory, if it's a git repo# switches to master branch, runs: git pull# switches back to whatever branch it was originallypullall () {dir=`pwd`echo "Begin pulling new master branch code for every child repo..."echo "..."for REPO in `ls -l | grep ^d | grep -oE '[^ ]+$'`;doecho "----------------------------"echo ""command -p cd "$REPO";if [ -d ".git" ]; thencbranch=`parseBranch`if [ $cbranch != "master" ]; thencommand git checkout "master"fiecho "pulling master branch of: $REPO ..."command git pullif [ $cbranch != "master" ]; thencommand -p cd "$cbranch"fificommand -p cd $dirdone;}# useful for extracting compressed foldersextract () {if [ -f $1 ] ; thencase $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()" ;;esacelseecho "'$1' is not a valid file"fi}####################### Eventbrite FUNCTIONS######################waiting-room-qa () {eid=$1if [ "$eid" -eq "$eid" ] 2>/dev/null; thenwhile true ; do curl http://evbqa.com/queue_rpc/get/$eid; doneelseecho "Try again with a valid Eventbrite Event ID"fi}
# swift repl fix - due to brew python being at the front of $PATH variablealias swift="PATH=/usr/bin:$PATH swift"# set mysql to the brew install pathalias mysql=/usr/local/mysql/bin/mysqlalias mysqladmin=/usr/local/mysql/bin/mysqladmin###################### GENERAL USE ALIASES#####################alias cp='cp -iv' # copy a file with the verbose and warning flagsalias mv='mv -iv' # move a file/dir with verbose and warning flagsalias mkdir='mkdir -pv' # make directory with the path and verbose flagsalias cd..='cd ../' # Go back 1 directory levelalias finder='open -a Finder ./' # Open current directory in MacOS Finderalias path='echo -e ${PATH//:/\\n}' # Echo all executable Pathsalias numFiles='echo $(ls -1 | wc -l)' # Count of non-hidden files in current diralias staticip='dig +short myip.opendns.com @resolver1.opendns.com' # get the static ip of the current networkalias vim=nvim # use neovim instead of vim# lr is a full recursive directory listing piped to lessalias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'' | less'#################### QUICK NAV Aliases###################export GOCODE=$GOPATH/src/github.com/mistahchris/
test -f ~/.bashrc && source ~/.bashrc######################## GENERAL USE FUNCTIONS######################## sets up the terminal to make working on a project easyworkon () {project=$1case $project in"eventbrite"*)cd $EBPATH;;"fastfile"*)cd /Users/ccummings/eventbrite_github/triage_projects/jira_modal;;"data_nerds"*)cd /Users/ccummings/mistahchris_github/data_nerds/pyenv activate data_nerds;;"tableau_help"*)cd /Users/ccummings/tableau_helpsource ./private/config_vars.shsource ./.profile.d/000-react-app-exports.sh;;esac}# Always list directory contents after 'cd'cd () {builtin cd "$@"; ls -a;}# moves a file to the macOS Trashtrash () {command mv "$@" ~/.Trash ;}# opens a file in the macOS previewpreview () {qlmanage -p "$*" >& /dev/null;}# creates a zip archive folderzipf () {zip -r "$1".zip "$1" ;}# make a directory and change into itmcd () {mkdir -p $1;cd $1;}calc () {echo "print($@)" | python3}# cdfinder changes the directory to the frontmost open finder windowcdfinder () {currFolderPath=$( /usr/bin/osascript <<EOTtell application "Finder"tryset currFolder to (folder of the front window as alias)on errorset currFolder to (path to desktop folder as alias)end tryPOSIX path of currFolderend tellEOT)echo "cd to \"$currFolderPath\""cd "$currFolderPath"}# sets the contents of a file to the macOS clipboardcopy () {cat $1 | pbcopy}# kill a process by namedie () {name=$1firstChar=${name:0:1}rest=${name:1:${#name}}pid=`ps aux | grep "[$firstChar]$rest" | awk '{print $2}'`kill $pid}# extracts the git branch nameparseBranch() {git branch | grep "^\* " | sed "s/\* //g"}# pullall iterates through each immediate child directory, if it's a git repo# switches to master branch, runs: git pull# switches back to whatever branch it was originallypullall () {dir=`pwd`echo "Begin pulling new master branch code for every child repo..."echo "..."for REPO in `ls -l | grep ^d | grep -oE '[^ ]+$'`;doecho "----------------------------"echo ""command -p cd "$REPO";if [ -d ".git" ]; thencbranch=`parseBranch`if [ $cbranch != "master" ]; thencommand git checkout "master"fiecho "pulling master branch of: $REPO ..."command git pullif [ $cbranch != "master" ]; thencommand -p cd "$cbranch"fificommand -p cd $dirdone;}
export BAY_HOME=/Users/ccummings/eventbrite_github/eventbrite/docker-devexport DM_START=/Users/ccummings/.evbdevtools/devtools/scripts/install_devenv/dm_start.shsource $DM_START
# useful for extracting compressed foldersextract () {if [ -f $1 ] ; thencase $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()" ;;esacelseecho "'$1' is not a valid file"fi}####################### Eventbrite FUNCTIONS######################waiting-room-qa () {eid=$1if [ "$eid" -eq "$eid" ] 2>/dev/null; thenwhile true ; do curl http://evbqa.com/queue_rpc/get/$eid; doneelseecho "Try again with a valid Eventbrite Event ID"fi}############################## Enable fzf key bindings
[ -f ~/.fzf.bash ] && source ~/.fzf.bash# use ag not find commandexport FZF_DEFAULT_COMMAND='ag -g ""'export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"_fzf_compgen_path() {ag -g "" "$1"}#############################
export TUG_HOME=/Users/ccummings/Eb-Github/eventbrite/docker-devexport DM_START=/Users/ccummings/.evbdevtools/devtools/scripts/install_devenv/dm_start.shsource $DM_STARTexport CLICOLOR=1 # enable colors
test -f ~/.bashrc && . .bashrc