Last active
February 9, 2023 05:36
-
-
Save nilesuan/c11a1c41a811fa19b9b518d2f10e2247 to your computer and use it in GitHub Desktop.
ZSHRC
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
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="lambda" | |
CASE_SENSITIVE="true" | |
zstyle ':omz:update' mode auto # update automatically without asking | |
# Uncomment the following line if pasting URLs and other text is messed up. | |
# DISABLE_MAGIC_FUNCTIONS="true" | |
# Uncomment the following line to disable colors in ls. | |
# DISABLE_LS_COLORS="true" | |
# Uncomment the following line to disable auto-setting terminal title. | |
# DISABLE_AUTO_TITLE="true" | |
# Uncomment the following line to enable command auto-correction. | |
# ENABLE_CORRECTION="true" | |
# Uncomment the following line to display red dots whilst waiting for completion. | |
# You can also set it to another string to have that shown instead of the default red dots. | |
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" | |
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) | |
# COMPLETION_WAITING_DOTS="true" | |
# Uncomment the following line if you want to disable marking untracked files | |
# under VCS as dirty. This makes repository status check for large repositories | |
# much, much faster. | |
# DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# Uncomment the following line if you want to change the command execution time | |
# stamp shown in the history command output. | |
# You can set one of the optional three formats: | |
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" | |
# or set a custom format using the strftime function format specifications, | |
# see 'man strftime' for details. | |
# HIST_STAMPS="mm/dd/yyyy" | |
# Would you like to use another custom folder than $ZSH/custom? | |
# ZSH_CUSTOM=/path/to/new-custom-folder | |
# Which plugins would you like to load? | |
# Standard plugins can be found in $ZSH/plugins/ | |
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ | |
# Example format: plugins=(rails git textmate ruby lighthouse) | |
# Add wisely, as too many plugins slow down shell startup. | |
plugins=(git zsh-autosuggestions zsh-syntax-highlighting) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
# export MANPATH="/usr/local/man:$MANPATH" | |
# You may need to manually set your language environment | |
# export LANG=en_US.UTF-8 | |
# Preferred editor for local and remote sessions | |
# if [[ -n $SSH_CONNECTION ]]; then | |
# export EDITOR='vim' | |
# else | |
# export EDITOR='mvim' | |
# fi | |
# Compilation flags | |
# export ARCHFLAGS="-arch x86_64" | |
# Set personal aliases, overriding those provided by oh-my-zsh libs, | |
# plugins, and themes. Aliases can be placed here, though oh-my-zsh | |
# users are encouraged to define aliases within the ZSH_CUSTOM folder. | |
# For a full list of active aliases, run `alias`. | |
# | |
# Example aliases | |
# alias zshconfig="mate ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
alias ll="ls -lah" | |
alias wp="lsof -i -P -n | grep LISTEN" # Which Ports are being used? | |
alias gfp="git fetch --all && git pull --all" | |
alias dcp="docker system prune -af --volumes" | |
alias dcu="docker-compose up" | |
alias dcd="docker-compose down" | |
alias dockerbench="docker run --rm -it --gpus=all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark" | |
alias jup="cd ~/notebooks && jupyter notebook" | |
alias tf="terraform" | |
alias avl="aws-vault list" | |
alias unaws="unset AWS_ACCESS_KEY_ID && unset AWS_SECRET_ACCESS_KEY" | |
alias k="kubectl23" | |
alias kcc="kubectl23 config use-context" | |
alias get_github_user='docker container run -it --rm get_github_user:latest -b $BAMBOOHR_KEY' | |
alias termination_report='docker run -it --rm -v /Volumes/GoogleDrive/:/Volumes/GoogleDrive termination_report:latest -b $BAMBOOHR_KEY -p $PAGERDUTY_TOKEN -g $GITHUB_TOKEN' | |
alias police_check='docker container run -it --rm pci_police_report:latest -b $BAMBOOHR_KEY' | |
alias add_github_user='docker container run -it --rm github_add_user:latest -b $BAMBOOHR_KEY -g $GITHUB_TOKEN' | |
alias saas_user_revoke='docker container run -it --rm saas_user_revoke:latest -b $BAMBOOHR_KEY -g $GITHUB_TOKEN -h $HONEYBADGER_TOKEN' | |
alias getunnel='dx infrastructure mysql-pipe -h goldeneye-dev-goldeneye-infrastructure.cluster-cfni24qvajia.us-west-2.rds.amazonaws.com -p 3307' | |
function drmi { | |
docker rmi $(docker images -f "dangling=true" -q) | |
} | |
function awsid { | |
unset AWS_ID | |
unset AWS_ACCOUNT | |
unset AWS_USERID | |
unset AWS_USERARN | |
unset AWS_ENV | |
export AWS_ID="$(aws sts get-caller-identity)" | |
export AWS_ACCOUNT="$(echo "$AWS_ID" | jq -r '.Account')" | |
export AWS_USERID="$(echo "$AWS_ID" | jq -r '.UserId')" | |
export AWS_USERARN="$(echo "$AWS_ID" | jq -r '.Arn')" | |
echo "AWS Account: $AWS_ACCOUNT" | |
echo "AWS Profile: $AWS_PROFILE" | |
echo "AWS Arn: $AWS_USERARN" | |
echo "AWS UserId: $AWS_USERID" | |
} | |
alias smlogin="aws sso login && aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 278521702583.dkr.ecr.us-west-2.amazonaws.com && ssh -fNL 1636:ldap.uswest2.siteminder.com:1636 bastion.uswest2.siteminder.com" | |
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 | |
# >>> conda initialize >>> | |
# !! Contents within this block are managed by 'conda init' !! | |
__conda_setup="$('/Users/nile.suan/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" | |
if [ $? -eq 0 ]; then | |
eval "$__conda_setup" | |
else | |
if [ -f "/Users/nile.suan/opt/anaconda3/etc/profile.d/conda.sh" ]; then | |
. "/Users/nile.suan/opt/anaconda3/etc/profile.d/conda.sh" | |
else | |
export PATH="/Users/nile.suan/opt/anaconda3/bin:$PATH" | |
fi | |
fi | |
unset __conda_setup | |
# <<< conda initialize <<< | |
# brew curl | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
# Exports | |
export SM_ENV="nsuan" | |
export GITHUB_DIRECTORY="$HOME/Projects" | |
export GITHUB_USERNAME=nilesuan | |
export GITHUB_TOKEN=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 | |
export BUILDKITE_API_TOKEN=a11d8ec9c197b5a7b729bae60771273cbb251fc5 | |
export ONELOGIN_USERNAME=nile.suan@siteminder.com | |
export BAMBOOHR_KEY=4161d137c8e71a5b4afb35b9e37d06b32942cf2f | |
export PAGERDUTY_TOKEN=u+1XqUaK4fUD5uS1AsGw | |
export HONEYBADGER_TOKEN=Ud3JXhok7cszR1XUptzF | |
export NODE_PREFIX="$(npm config get prefix)" | |
export DOCKER_DEFAULT_PLATFORM=linux/amd64 | |
export AWS_PROFILE=dev | |
# Temporary | |
# zsh completions have been installed to: /usr/local/opt/curl/share/zsh/site-functions | |
export PATH="/usr/local/go/bin:$PATH" | |
# export PATH="$(pyenv root)/shims:${PATH}" | |
export PATH="/usr/local/opt/curl/bin:$PATH" | |
export PATH="/usr/local/opt/libpq/bin:$PATH" | |
export PATH="/Users/nile.suan/Android/platform-tools:$PATH" | |
export PATH="$PATH:$HOME/Bin" | |
export PATH="$PATH:$GITHUB_DIRECTORY/infrastructure-deploy" | |
export PATH="$PATH:$GITHUB_DIRECTORY/infrastructure-core/tools" | |
export NODE_PATH="$NODE_PREFIX/lib/node_modules" | |
export PATH="$PATH:$NODE_PREFIX/bin" | |
export LDFLAGS="-L/usr/local/opt/curl/lib" | |
export CPPFLAGS="-I/usr/local/opt/curl/include" | |
# The next line updates PATH for the Google Cloud SDK. | |
if [ -f '/Users/nile.suan/Downloads/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/nile.suan/Downloads/google-cloud-sdk/path.zsh.inc'; fi | |
# The next line enables shell command completion for gcloud. | |
if [ -f '/Users/nile.suan/Downloads/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/nile.suan/Downloads/google-cloud-sdk/completion.zsh.inc'; fi | |
function custom_prompt { | |
local aws_profile="${AWS_PROFILE:=default}" | |
echo "%{$fg_bold[blue]%}(${aws_profile})%{$reset_color%} " | |
} | |
# PROMPT="$PROMPT$(custom_prompt)" | |
# sudo du -h $(pwd) --max-depth=1[[ $commands[kubectl] ]] && source <(kubectl completion zsh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment