Skip to content

Instantly share code, notes, and snippets.

@mbektimirov
Created October 24, 2018 20:31
Show Gist options
  • Save mbektimirov/b72f484cd44e5bc029d0ec68a0c81ea0 to your computer and use it in GitHub Desktop.
Save mbektimirov/b72f484cd44e5bc029d0ec68a0c81ea0 to your computer and use it in GitHub Desktop.
# Set CLICOLOR if you want Ansi Colors in iTerm2
export CLICOLOR=1
#
# # Set colors to match iTerm2 Terminal Colors
export TERM=xterm-256color
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
fpath=($HOME/.zsh/zsh-completions $fpath)
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="pure"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# 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)
plugins=(vagrant mvn heroku git github hub svn brew django gem node npm osx pip python terminalapp gem rvm ruby zsh-syntax-highlighting grunt bower component git-extras nyan iwhois)
source $ZSH/oh-my-zsh.sh
source $ZSH/plugins/k.sh
# Customize to your needs...
PATH=$PATH:/usr/local/share/npm/bin
export PGHOST=/tmp
export ANDROID_SDK=~/Library/Android/sdk
# export ANDROID_NDK=~/_dev/_android/android-ndk-r9
export ANDROID_HOME=$ANDROID_SDK
export ANDROID_SDK_ROOT=$ANDROID_SDK
# export ANDROID_NDK_ROOT=$ANDROID_NDK
PATH=$PATH:$ANDROID_SDK/tools/bin:$ANDROID_SDK/platform-tools:$ANDROID_NDK
PATH=$PATH:~/_dev/arcanist_home/arcanist/bin/
export GOPATH=$HOME/_dev/_go
PATH=$PATH:$GOPATH/bin
export GIT_MERGE_AUTOEDIT=no
export EDITOR='/usr/bin/vim'
# my help functions #####################################################
# $1 - directory with *.zip files
# $2 - out directory
#
# unzipall ./my_zip_files ./my_zip_files/unpacked
unzipall () {
for z in `ls $1/*.zip`; do out_dir=$2/$(basename ${z%.*}); mkdir -p $out_dir; unzip $z -d $out_dir ; done;
}
# #######################################################################
zstyle ':completion:*' special-dirs true
# export GNUTERM=x11
# Get readable list of network IPs
alias ips="ifconfig -a | perl -nle'/(\d+\.\d+\.\d+\.\d+)/ && print $1'"
alias myip="dig +short myip.opendns.com @resolver1.opendns.com"
alias flush="dscacheutil -flushcache" # Flush DNS cache
alias gzip="gzip -9n" # set strongest compression level as ‘default’ for gzip
alias ping="ping -c 5" # ping 5 times ‘by default’
alias ql="qlmanage -p 2>/dev/null" # preview a file using QuickLook
alias s="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
alias c=clear
alias glog='git log --decorate --stat --graph --pretty=format:"%d %Cgreen%h%Creset (%ar - %Cred%an%Creset), %s%n"'
alias commit='git commit -m '
alias cm=commit
alias o=open
alias vmplocal='ssh vmplocal'
alias vmpru='ssh vmpru'
alias lh='ll -h'
alias ls='ls -A'
alias f=ag
alias json="jq '.'"
alias is="npm install --save"
alias isd="npm install --save-dev"
alias i="npm i"
alias stripstyle='pbpaste | pbcopy'
alias ds="du -hcs"
alias yad="yarn add -D "
alias r="npm run "
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
PATe=$PATH:~/_dev/_cpp/qt-5.2/5.2.0/clang_64/bin
mkcd () {
mkdir -p "$1" && cd "$1"
}
spy () {
lsof -i -P +c 0 +M | grep -i "$1"
}
flacToMp3 () {
for file in *.flac ; do
ffmpeg -i "$file" -ab 320k -map_metadata 0 -id3v2_version 3 "${file%.*}.mp3"
done
}
flacToMp3Recursive () {
for folder in "$(find . -name "*.flac" -print0 | xargs -0 -n1 dirname | uniq)"; do
echo -e "Converting flac to mp3 in '$folder'"
# cd $folder && flacToMp3 && trash *.flac
done
}
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