Skip to content

Instantly share code, notes, and snippets.

@ceane
Last active July 16, 2018 22:39
Show Gist options
  • Save ceane/767629587671c8281bfc2aa984976698 to your computer and use it in GitHub Desktop.
Save ceane/767629587671c8281bfc2aa984976698 to your computer and use it in GitHub Desktop.
# locales
export LANG="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# antigen
export ZSHA_BASE="$HOME/.antigen"
source "$ZSHA_BASE/antigen.zsh"
antigen use oh-my-zsh
antigen bundles <<EOBUNDLES
brew
git
heroku
zsh-users/zsh-syntax-highlighting
zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
lukechilds/zsh-nvm
EOBUNDLES
antigen theme refined
antigen apply
# end antigen
# ZSH_THEME="fino"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
export UPDATE_ZSH_DAYS=1
# 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.
# 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.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# 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? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git vi-mode)
# User configuration
# export PATH="/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
# 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"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# 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"
# Run tmux on login
if command -v tmux>/dev/null; then
# [[ ! $TERM =~ screen ]] && [ -z $TMUX ] && exec tmux
fi
# Auto load nvmrc
autoload -U add-zsh-hook
load-nvmrc() {
local node_version="$(nvm version)"
local nvmrc_path="$(nvm_find_nvmrc)"
if [ -n "$nvmrc_path" ]; then
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
if [ "$nvmrc_node_version" != "N/A" ] && [ "$nvmrc_node_version" != "$node_version" ]; then
nvm use
fi
elif [ "$node_version" != "$(nvm version default)" ]; then
echo "Reverting to nvm default version"
nvm use default
fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc
eval "$(thefuck --alias)"
alias re="echo \"Reloading...\" && source ~/.zshrc"
alias vimrc="vim ~/.vimrc"
alias zshrc="vim ~/.zshrc"
alias zshenv="vim ~/.zshenv"
alias ohmyzsh="vim ~/.oh-my-zsh/oh-my-zsh.sh"
alias newapp="create-react-app"
alias hrc="vim ~/.hyper.js"
alias gs="git status"
# posgres
# alias startpg='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'
# alias stoppg='pg_ctl -D /usr/local/var/postgres stop -s -m fast'
# alias restartpg='stoppost && sleep 1 && startpost'
# alias reloadpg='pg_ctl reload -D /usr/local/var/postgres -s'
# alias statuspg='pg_ctl status -D /usr/local/var/postgres -s'
# alias autostartredist="ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents"
export SHORT_HOST="ceanela"
export PATH="/usr/local/bin:${PATH}"
export PATH="$PATH:`yarn global bin`"
export VISUAL="vim"
export EDITOR="$VISUAL"
export TERM="xterm-256color"
export GIT_TEMPLATE_DIR=~/.git-hooks
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# fzf search CLI history
fh() {
print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed 's/ *[0-9]* *//')
}
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
# export PATH="$PATH:$HOME/.rvm/bin"
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment