Skip to content

Commit

Permalink
Updating to nvim and various configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tvs committed May 9, 2024
1 parent fe16be8 commit 709b8a7
Show file tree
Hide file tree
Showing 13 changed files with 3,206 additions and 308 deletions.
8 changes: 4 additions & 4 deletions .bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

# test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"

# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/thall/src/google-cloud-sdk/path.bash.inc' ]; then . '/Users/thall/src/google-cloud-sdk/path.bash.inc'; fi
export GOPATH="$HOME/go"; export GOROOT="$HOME/.go"; export PATH="$GOPATH/bin:$PATH"; # g-install: do NOT edit, see https://github.com/stefanmaric/g

# The next line enables shell command completion for gcloud.
if [ -f '/Users/thall/src/google-cloud-sdk/completion.bash.inc' ]; then . '/Users/thall/src/google-cloud-sdk/completion.bash.inc'; fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
107 changes: 46 additions & 61 deletions .gitconfig
Original file line number Diff line number Diff line change
@@ -1,79 +1,64 @@
[user]
name = Travis Hall
email = [email protected]
name = Travis Hall
email = [email protected]
[core]
editor = nvim
[color]
diff = auto
status = auto
branch = auto
diff = auto
status = auto
branch = auto
[alias]
au = add --update
ds = diff --staged # git ds - diff your staged changes == review before committing
st = status -sb # smarter status - include tag and branch info
fup = log --since '1 day ago' --oneline --author [email protected]
ls = log --pretty=format:'%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short
lsv = log --pretty=format:'%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short --numstat
au = add --update
ds = diff --staged # git ds - diff your staged changes == review before committing
st = status -sb # smarter status - include tag and branch info
fup = log --since '1 day ago' --oneline --author [email protected]
ls = log --pretty=format:'%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short
lsv = log --pretty=format:'%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short --numstat

r = reset
rh = reset --hard
r = reset
rh = reset --hard

cp = cherry-pick
cl = clone
ci = commit
co = checkout
br = branch
diff = diff --word-diff
dc = diff --cached
pom = push origin master
cp = cherry-pick
cl = clone
ci = commit
co = checkout
br = branch
diff = diff --word-diff
dc = diff --cached
pom = push origin master

sl = stash list
sa = stash apply
ss = stash save
sl = stash list
sa = stash apply
ss = stash save

l = log
lh = log --graph
la = !git lh --date-order --all 2> /dev/null
lb = log --graph --simplify-by-decoration
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = 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
lg = !git lg1
lba = !git lb --all
h = !git --no-pager log --graph -n 15
a = !git --no-pager la -n 15
l = log
lh = log --graph
la = !git lh --date-order --all 2> /dev/null
lb = log --graph --simplify-by-decoration
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = 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
lg = !git lg1
lba = !git lb --all
h = !git --no-pager log --graph -n 15
a = !git --no-pager la -n 15

ignored = !git ls-files -v | grep '^[[:lower:]]'
forget = update-index --assume-unchanged
remember = update-index --no-assume-unchanged

dci = duet-commit
drv = duet-revert
dmg = duet-merge
drb = rebase -i --exec 'git duet-commit --amend --reset-author'
ignored = !git ls-files -v | grep '^[[:lower:]]'
forget = update-index --assume-unchanged
remember = update-index --no-assume-unchanged
[diff]
tool = vimdiff
tool = nvim -d
[difftool]
prompt = false
[difftool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args \"$LOCAL\" \"$PWD/$REMOTE\"
prompt = false
[merge]
tool = vimdiff
tool = nvim -d
conflictstyle = diff3
[mergetool]
prompt = false
[mergetool "meld"]
trustExitCode = true
cmd = open -W -a Meld --args --auto-merge \"$PWD/$LOCAL\" \"$PWD/$BASE\" \"$PWD/$REMOTE\" --output=\"$PWD/$MERGED\"
[gitreview]
remote = origin
[duet "env"]
git-author-initials = th
git-author-name = Travis Hall
git-author-email = [email protected]
mtime = 1502917004
git-committer-initials =
git-committer-name =
git-committer-email =
[url "[email protected]:"]
insteadOf = https://github.com/
[url "[email protected]:"]
insteadof = https://gitlab.eng.vmware.com/
[pull]
rebase = false
[init]
defaultBranch = main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vim/plugged/*
43 changes: 17 additions & 26 deletions .profile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ PATH="/usr/local/opt/curl/bin:$PATH"
PATH=$PATH:/usr/local/kubebuilder/bin
PATH=$PATH:$HOME/src/tools/bin

## nvim aliases
alias vi=nvim
alias vim=nvim

## Git Branch Display
function parse_git_branch () {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
Expand All @@ -27,7 +31,7 @@ PS1='\[\e[0;32m\]\u:\[\e[m\]\[\e[0;36m\]\w\[\e[m\]\[\e[0;32m\]$(parse_git_branch

### DBC ALIASES
export DBCUSER="thall"
export DBCHOST="sc-dbc1220"
export DBCHOST="sc-dbc2162"
export DBCSERV="$DBCHOST.eng.vmware.com"
alias dbcssh="ssh $DBCSERV"

Expand All @@ -36,28 +40,16 @@ nimbusshuttle() {
sshuttle -r kubo@$1 30.0.0.0/16 40.0.0.0/16 192.168.111.0/24 192.168.150.0/24 -e 'ssh -o StrictHostKeyChecking=no'
}

### ESXi ALIASES
export ESXSERV="sea2-office-dhcp-96-170"
alias esxssh="ssh root@$ESXSERV"

### TOOLCHAIN
export TCROOT="/build/toolchain"

### Aliases
alias ovftool="/Applications/VMware\ OVF\ Tool/ovftool"
alias e="subl -n ."

### JAVA HOME
#export JAVA_HOME=$(/usr/libexec/java_home)

### GO PATH
export GOPATH=$HOME/workspace/go
PATH=$PATH:$GOPATH/bin

alias gopseudo='TZ=UTC git --no-pager show --quiet --abbrev=12 --date='format-local:v0.0.0-%Y%m%d%H%M%S' --format="%cd-%h"'

### GIT DUET
export GIT_DUET_ROTATE_AUTHOR=1
### Generate a Golang pseduo version
alias gopseudo='TZ=UTC git --no-pager show --quiet --abbrev=12 --date='format-local:v0.0.0-%Y%m%d%H%M%S' --format="%cd-%h"'

### SSH AUTOCOMPLETE
_complete_ssh_hosts ()
Expand All @@ -77,13 +69,6 @@ complete -F _complete_ssh_hosts scp
### DIRENV HOOK
eval "$(direnv hook bash)"

### KUBO ENVS
export LOCKS=$HOME/workspace/envs
export MY_KUBO=$HOME/workspaces/envs/thall

### KUBO HOME
PATH=$PATH:$HOME/workspace/kubo-home/bin

### PAGE ZIPPED FILES
alias less=zless

Expand All @@ -100,9 +85,15 @@ if [ -d /usr/local/etc/bash_completion.d ]; then
done
fi

### GIMME
source $HOME/.gimme/envs/latest.env 2&> /dev/null
# GO Settings
export GOPRIVATE=gitlab.eng.vmware.com

### WCP GARBAGE
export WCP_LOAD_K8S_MASTER=$HOME/workspace/gcm/main-18q2/bora/vpx/wcp/support/load-k8s-master
### COLIMA/DOCKER HOST
export DOCKER_HOST="unix:///Users/thall/.colima/default/docker.sock"

### Get Supervisor Control Plane credentials
getsupervisorcreds() {
ssh-keygen -R "$1"
ssh-keyscan "$1" >> ~/.ssh/known_hosts
sshpass -p "$2" ssh -o IdentitiesOnly=yes -F /dev/null root@$1 '/usr/lib/vmware-wcp/decryptK8Pwd.py'
}
Loading

0 comments on commit 709b8a7

Please sign in to comment.