Last active
November 24, 2025 21:47
-
-
Save timwright12/469716e97c3fafab6688972247cf1771 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
| export NVM_DIR="$HOME/.nvm" | |
| [ -s "/usr/local/opt/nvm/nvm.sh" ] && \. "/usr/local/opt/nvm/nvm.sh" # This loads nvm | |
| [ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && \. "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion | |
| # Terminal Alias | |
| NEWLINE=$'\n' | |
| ME=$'tim' | |
| PROMPT="${NEWLINE}%B%F{white}%1~%f%b${NEWLINE}[${ME}] -> " | |
| # PROMPT="${NEWLINE}%B%F{white}%1~%f%b${NEWLINE}[%m][${ME}] -> " | |
| # Command alias | |
| alias edithosts='sudo code /private/etc/hosts' | |
| alias editbash='code ~/.zshrc' | |
| alias ls='ls -l' | |
| alias phpserver='php -S localhost:8000' | |
| alias pythonserver='python -m SimpleHTTPServer 8888' | |
| alias npm-remove-packages='rm -rf node_modules/' | |
| alias npm-reset-packages='rm -rf node_modules/ && yarn' | |
| # git | |
| alias gs='git status' | |
| alias gb='git branch' | |
| alias gp='git push' | |
| # Directory shortcuts | |
| alias home='cd ~' | |
| alias sites='cd ~/Sites' | |
| alias desktop='cd ~/Desktop' | |
| alias sandbox='cd ~/Sites/sandbox' | |
| alias nj='cd ~/Sites/nj' | |
| server() { | |
| python -m SimpleHTTPServer $1 | |
| } | |
| # Usage: link /path/to/original /path/to/symlink | |
| symlink() { | |
| ln -s $1 $2 | |
| } | |
| # Usage: remove path/to/dir | |
| remove() { | |
| rm -rf $1 | |
| } | |
| ## File diff | |
| fs-diff() { | |
| diff -ur $1 $2 | delta | |
| } | |
| # Usage: git-show-conflicts | |
| git-show-conflicts() { | |
| git diff --name-only --diff-filter=U | |
| } | |
| # USAGE: git-archive feature/branch-name | |
| git-archive() { | |
| git checkout $1 | |
| git tag archive/$1 | |
| git push origin archive/$1 | |
| git checkout master | |
| git branch -D $1 | |
| git push origin :$1 | |
| } | |
| # USAGE: git-upstream-set {{repo url}} | |
| git-upstream-set() { | |
| git remote add upstream $1 | |
| git fetch upstream | |
| } | |
| # USAGE: git-pull-fork 54 feature/whatever | |
| git-pull-fork() { | |
| git fetch origin pull/$1/head:$2 | |
| } | |
| source /usr/local/opt/chruby/share/chruby/chruby.sh | |
| # Add RVM to PATH for scripting. Make sure this is the last PATH variable change. | |
| export PATH="$PATH:$HOME/.rvm/bin" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PATH updates
export NVM_DIR=~/.nvm
export PATH="/usr/local/opt/ruby/bin:$PATH"
source $(brew --prefix nvm)/nvm.sh
source /usr/local/share/chruby/chruby.sh
source /usr/local/share/chruby/auto.sh
source /opt/homebrew/opt/chruby/share/chruby/chruby.sh
source /opt/homebrew/opt/chruby/share/chruby/auto.sh
Terminal Alias
NEWLINE=$'\n'
ME=$'tim'
PROMPT="${NEWLINE}%B%F{white}%1~%f%b${NEWLINE}[%m][${ME}] -> "
Command alias
alias edithosts='sudo vi /private/etc/hosts'
alias editbash='code ~/.zshrc'
alias phpserver='php -S localhost:8000'
alias pythonserver='python -m SimpleHTTPServer 8888'
alias npm-remove-packages='rm -rf node_modules/'
alias npm-reset-packages='rm -rf node_modules/ && yarn'
alias socksup='ssh socks -D 2001 -N &'
alias sockson='bash ~/Sites/va-gov/devops/utilities/va.sh socks on'
alias socksoff='bash ~/Sites/va-gov/devops/utilities/va.sh socks off'
alias socksadd='ssh-add -K ~/.ssh/id_rsa'
alias start-vets-api='cd ~/Sites/va-gov/vets-api && bin/setup native && foreman start -m all=1,clamd=0,freshclam=0';
Directory shortcuts
alias home='cd ~'
alias sites='cd ~/Sites'
alias desktop='cd ~/Desktop'
alias sandbox='cd ~/Sites/sandbox'
Project alias
alias va='cd ~/Sites/va-gov/va-mobile-app/ && cd VAMobile && nvm use && git branch'
alias api='cd ~/Sites/va-gov/vets-api/ && git branch'
alias va-build-prod='NODE_ENV=production ./script/build.sh --buildtype vagovprod'
alias va-build-staging='NODE_ENV=production ./script/build.sh --buildtype vagovstaging'
alias va-build-dev='NODE_ENV=production ./script/build.sh --buildtype vagovdev'
alias va-reset='rm -rf node_modules/ && rm -rf .cache/ && rm -rf build/ && yarn && yarn build'
alias content-build='cd ~/Sites/va-gov/content-build/ && git branch'
alias devops='cd ~/Sites/va-gov/devops/ && git branch'
Docker
alias dockerup='docker-compose up -d'$(docker ps -a -q) && docker rm $ (docker ps -a -q)'
alias dockerdown='docker-compose down'
alias dockerstop='docker stop $(docker ps -a -q)'
alias dockerdelete='docker rm $(docker ps -a -q)'
alias dockerkill='docker stop
Git
alias gb='git branch'
alias gs='git status'
alias gp='git pull'
Usage: createrelease v2.45.0
https://department-of-veterans-affairs.github.io/va-mobile-app/docs/Engineering/DevOps/Automation%20Code%20Docs/GitHub%20Actions/ReleaseIssues#re-releasing-a-failed-build
createrelease() {
git tag --delete $1
git push --delete origin $1
git checkout release/$1
git pull
git tag -a $1 -m $1
git push origin $1
}
server() {
python -m SimpleHTTPServer $1
}
Usage: useruby 3.4.2
useruby() {
chruby $1
}
Usage: symlink /path/to/original /path/to/symlink
symlink() {
ln -s $1 $2
}
Usage: remove path/to/dir
remove() {
rm -rf $1
}
File diff
fs-diff() {
diff -ur $1 $2 | delta
}
Directory diff
Usage: src/site ../vets-website/src/site
fs-dir-diff() {
diff -rq $1 $2
}
Usage: git-show-conflicts
git-show-conflicts() {
git diff --name-only --diff-filter=U
}
USAGE: git-archive feature/branch-name
git-archive() {
git checkout $1
git tag archive/$1
git push origin archive/$1
git checkout master
git branch -D $1
git push origin :$1
}
USAGE: git-upstream-set {{repo url}}
git-upstream-set() {
git remote add upstream $1
git fetch upstream
}
USAGE: git-pull-fork 54 feature/whatever
git-pull-fork() {
git fetch origin pull/$1/head:$2
}
Need to add code into a release after it has been created (but not pushed to the stores)
Usage: recreate-release RC-vX.XX.0-XXXXXX-XXXX vX.XX.X
https://department-of-veterans-affairs.github.io/va-mobile-app/docs/Engineering/DevOps/AutomationCodeDocs/GitHubActions/ReleaseIssues#need-to-add-code-into-a-release-after-it-has-been-created-but-not-pushed-to-the-stores
recreate-release() {
# Do first: Add updated code into the release branch release/vX.X.X and push to github
git tag --delete $1
git push --delete origin $1
git checkout release/$2
git pull
git tag -a $1 -m $1
git push origin $1
}
JAVA_HOME` variable pointing to the java installed above example
export JAVA_HOME=$(/usr/libexec/java_home -v 21.0.0)
NODE_OPTIONSthis is to manage the node memory spaceexport NODE_OPTIONS=--max_old_space_size=8192
Android specific vars for the ANDROID_HOME, platform-tools and cmdline-tools
export ANDROID_SDK=/Users/tim/Library/Android/sdk
export ANDROID_HOME=$ANDROID_SDK
export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
The build of the app relies on a scripted creation of the .env
file to run correctly. You will need to add the
APP_CLIENT_SECRETvar to work correctly:
export APP_CLIENT_SECRET='###'
The app has a demo mode. To use demo mode the app reads the
DEMO_PASSWORDvar. You can set this to a blank password orassign any string to it
export DEMO_PASSWORD=''
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib"
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include"
Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
python3 to path
export PATH="/opt/homebrew/bin/python3:$PATH"
Created by
pipxon 2025-07-29 15:05:47export PATH="$PATH:/Users/tim/.local/bin"