Last active
August 29, 2015 13:57
-
-
Save s-y/9511366 to your computer and use it in GitHub Desktop.
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
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="robbyrussell" | |
VIRTUALENVWRAPPER_PYTHON=/usr/bin/python | |
DEFAULT_USER="ihor" | |
export UPDATE_ZSH_DAYS=2 | |
COMPLETION_WAITING_DOTS="true" | |
DISABLE_UNTRACKED_FILES_DIRTY="true" | |
# git fabric python django | |
#plugins=( rails virtualenvwrapper yum rsync themes mercurial pip zsh-history-substring-search zsh-syntax-highlighting) | |
plugins=(virtualenvwrapper yum mercurial pip ) | |
###ZSH_THEME="kolo" | |
source $ZSH/oh-my-zsh.sh | |
### Theme or Promt, not both | |
# For some themes | |
zstyle ':completion:*' expand prefix suffix | |
zstyle ':completion:*' file-sort access | |
zstyle ':completion:*' list-suffixes true | |
zstyle :compinstall filename '/home/ihor/.zshrc' | |
zstyle ':completion:*' verbose true | |
zstyle ':completion:*' extra-verbose true | |
autoload -Uz compinit | |
compinit | |
HISTFILE=~/.histfile | |
HISTSIZE=100000 | |
SAVEHIST=100000000000000 | |
bindkey -M emacs '^P' history-substring-search-up | |
bindkey -M emacs '^N' history-substring-search-down | |
# λ | |
zstyle -e ':completion:*:-command-:*:commands' list-colors 'reply=( '\''=(#b)('\''$words[CURRENT]'\''|)*-- #(*)=0=38;5;45=38;5;136'\'' '\''=(#b)('\''$words[CURRENT]'\''|)*=0=38;5;45'\'' )' | |
# | |
BROWSER=chromium-browser | |
exc () { | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.tar.xz) tar xfJ $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) unrar x $1 ;; | |
*.gz) gunzip $1 ;; | |
*.tar) tar xf $1 ;; | |
*.tbz2) tar xjf $1 ;; | |
*.tgz) tar xzf $1 ;; | |
*.zip) unzip $1 ;; | |
*.Z) uncompress $1 ;; | |
*.7z) 7z x $1 ;; | |
*) echo "'$1' cannot be extracted via >extract<" ;; | |
esac | |
echo "'$1' успешно извлечен " | |
else | |
echo "'$1' is not a valid file" | |
fi | |
} | |
mkcd () { | |
mkdir "$1" | |
cd "$1" | |
} | |
alias ai="sudo aptitude install" | |
alias rpep="autopep8 -i -r . ;" | |
alias rsort="find . -name \"*.py\" -exec isort {} \;" | |
#alias oh="chromium-browser" | |
alias ch="chromium" | |
#alias of="subl" | |
alias b="cd .." | |
alias v="gvim" | |
alias ap="sudo aptitude" | |
alias serv="python -m SimpleHTTPServer 8887" | |
alias gc="git clone" | |
#alias cp="rsync -av -P " | |
alias as="sudo aptitude search" | |
alias mkv="mkvirtualenv --no-site-packages" | |
#alias mkv3="mkvirtualenv --no-site-packages --python=/usr/local/bin/python3" | |
alias dea="deactivate" | |
alias spi="sudo pip install" | |
alias pi="pip install" | |
alias c="clear" | |
#alias dumpjson="python manage.py dumpdata --format=json > fixtures/initial_data.json" | |
alias LL="LANGUAGE=en_US" | |
alias run="python ./manage.py runserver" | |
#alias dump="python ./manage.py dumpdata --natural --exclude=contenttypes --exclude=auth --exclude=admin --exclude=sessions > data.json" | |
#alias load="python ./manage.py loaddata" | |
GOPATH=/home/ihor/gocode | |
alias compasc="hg clone https://s-y@bitbucket.org/s-y/compass;rm -rf compass/.hg;" | |
setopt correctall | |
autoload -U compinit && compinit | |
check_virtualenv() { | |
if [ -e .venv ]; then | |
env=`cat .venv` | |
if [ "$env" != "${VIRTUAL_ENV##*/}" ]; then | |
echo "Found .venv in directory. Calling: workon ${env}" | |
workon $env | |
fi | |
fi | |
} | |
#venv_cd () { | |
# builtin cd "$@" && check_virtualenv | |
#} | |
# alias cd="venv_cd" | |
load(){ | |
source ~/.nvm/nvm.sh | |
export PYENV_ROOT="$HOME/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" | |
} | |
install_all(){ | |
echo "https://github.com/creationix/nvm" | |
echo 'npm nodejs coffee' | |
echo '\curl -sSL https://get.rvm.io | bash -s stable' | |
echo 'heroku foreman compass' | |
echo 'https://github.com/yyuu/pyenv' | |
echo 'https://github.com/yyuu/pyenv-virtualenv' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment