Skip to content

Instantly share code, notes, and snippets.

@BastienM
Created February 5, 2018 16:45
Show Gist options
  • Select an option

  • Save BastienM/0f68467f6aed3208e00e26d222617e06 to your computer and use it in GitHub Desktop.

Select an option

Save BastienM/0f68467f6aed3208e00e26d222617e06 to your computer and use it in GitHub Desktop.
# --------------------------
# Zprezto loading
# --------------------------
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# --------------------------
# Zsh settings
# --------------------------
HISTFILE=~/.zsh_history
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd nomatch notify
unsetopt beep extendedglob
bindkey -e
bindkey "^R" history-incremental-search-backward
autoload -Uz compinit
compinit
# --------------------------
# Golang options
# --------------------------
export GOPATH=$HOME/Workspace/Go
export GOROOT=/usr/local/opt/[email protected]/libexec
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
# ---------------------------
# User options
# ---------------------------
export PATH=$PATH:/usr/local/opt/[email protected]/libexec/bin
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_VIRTUALENV_ARGS='--no-site-packages'
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
fi
alias zshconfig="vim ~/.zshrc"
alias zshreload="source ~/.zshrc"
alias vimconfig="vim ~/.vimrc"
alias ll="ls -lah"
alias tf="terraform"
alias tg="terragrunt"
alias sshconfig="vim $HOME/.ssh/config"
alias aws-whoami="aws sts get-caller-identity"
alias awsconfig="vim $HOME/.aws/credentials"
alias kc="kubectl"
function aws-set() {
profile="${1:-default}"
export AWS_PROFILE="${profile}"
export AWS_ACCESS_KEY_ID=`aws configure get aws_access_key_id --profile $profile`
export AWS_SECRET_ACCESS_KEY=`aws configure get aws_secret_access_key --profile $profile`
export AWS_DEFAULT_REGION="eu-west-1"
}
function load-ssh {
SSHKEYS_PATH="${HOME}/.ssh"
key_path=$(find $SSHKEYS_PATH -name $1)
if [[ ! -z "${key_path}" ]]; then
ssh-add ${key_path}
else
echo "Unable to find key: ${1}"
fi
}
neofetch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment