2012-08-26 17:07:30 +00:00
|
|
|
# Path to your oh-my-zsh configuration.
|
|
|
|
ZSH=$HOME/.oh-my-zsh
|
|
|
|
ZSH_THEME="webgefrickel"
|
|
|
|
|
2012-09-09 09:42:27 +00:00
|
|
|
# default plugins to load
|
|
|
|
plugins=(brew git npm node gem osx)
|
|
|
|
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
unsetopt correct_all
|
|
|
|
|
|
|
|
# paths
|
|
|
|
export PATH=/usr/local/bin:/usr/local/sbin:$HOME/.rvm/bin:$PATH
|
|
|
|
export MANPATH=/usr/local/share/man:$MANPATH
|
|
|
|
|
|
|
|
# disable stupid ._ and dsstore files
|
|
|
|
export COPY_EXTENDED_ATTRIBUTES_DISABLE=true
|
|
|
|
export COPYFILE_DISABLE=true
|
|
|
|
|
|
|
|
# editor
|
|
|
|
export EDITOR=mvim
|
|
|
|
VISUAL=$EDITOR;
|
|
|
|
export VISUAL
|
|
|
|
|
|
|
|
# node.js
|
|
|
|
export NODE_PATH=/usr/local/lib/jsctags/:$NODE_PATH
|
|
|
|
|
2012-08-26 17:07:30 +00:00
|
|
|
### aliases ##
|
|
|
|
# aliases for apache and mysql
|
|
|
|
alias apachestart='_ /usr/sbin/apachectl start'
|
|
|
|
alias apachestop='_ /usr/sbin/apachectl stop'
|
2012-05-28 14:38:01 +00:00
|
|
|
alias mysqlstart='mysql.server start'
|
|
|
|
alias mysqlstop='mysql.server stop'
|
2012-07-23 20:44:19 +00:00
|
|
|
alias dev='apachestart && mysqlstart'
|
2012-07-02 10:19:54 +00:00
|
|
|
alias devs='apachestop && mysqlstop'
|
2012-05-28 14:38:01 +00:00
|
|
|
|
2012-05-30 18:23:20 +00:00
|
|
|
# start virtuoso
|
2012-06-04 18:14:49 +00:00
|
|
|
alias virt='cd /usr/local/Cellar/virtuoso/6.1.5/var/lib/virtuoso/db/ && virtuoso-t -df'
|
2012-05-30 18:23:20 +00:00
|
|
|
|
2012-05-28 14:38:01 +00:00
|
|
|
# dnsflush-shortcut
|
2012-08-26 17:07:30 +00:00
|
|
|
alias dnsflush='_ dscacheutil -flushcache'
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
# all in one homebrew, gem and vim bundles update commands
|
2012-08-26 17:07:30 +00:00
|
|
|
alias dotup='cd ~/Dotfiles/ && git pull && cd -'
|
|
|
|
alias dotsubup='cd ~/Dotfiles/ && git submodule foreach git pull && cd -'
|
2012-05-28 14:38:01 +00:00
|
|
|
alias brewup='brew update && brew upgrade && brew cleanup && brew linkapps'
|
2012-08-26 17:07:30 +00:00
|
|
|
alias gemup='gem update --system && gem update && gem cleanup'
|
2012-07-08 11:55:18 +00:00
|
|
|
alias npmup='npm -g cache clean && npm -g update'
|
2012-08-26 17:07:30 +00:00
|
|
|
alias rvmup='rvm get latest'
|
|
|
|
alias upall='brewup && rvmup && gemup && npmup && dotup && dotsubup'
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
# always use mvim
|
|
|
|
alias v='mvim'
|
2012-08-26 17:07:30 +00:00
|
|
|
alias vim='mvim'
|
2012-05-28 14:38:01 +00:00
|
|
|
alias vd='mvimdiff'
|
|
|
|
alias diff='mvimdiff'
|
|
|
|
|
2012-08-26 17:07:30 +00:00
|
|
|
# easy hosts-editing
|
2012-09-05 13:32:17 +00:00
|
|
|
alias hosts='_ mvim /etc/hosts'
|
|
|
|
alias vhosts='_ mvim /etc/apache2/extra/httpd-vhosts.conf'
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
# Easier navigation: .., ..., ~ and -
|
|
|
|
alias ..='cd ..'
|
|
|
|
alias ...='cd ../..'
|
2012-08-26 17:07:30 +00:00
|
|
|
alias ....='cd ../../..'
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
# Shortcuts
|
2012-08-26 17:07:30 +00:00
|
|
|
alias drop='cd ~/Dropbox && l'
|
|
|
|
alias web='cd ~/Sites && l'
|
|
|
|
alias rep='cd ~/Repositories && l'
|
|
|
|
alias dot='cd ~/Dotfiles && l'
|
2012-05-28 14:38:01 +00:00
|
|
|
|
|
|
|
# Gitty gitgit
|
2012-08-26 17:07:30 +00:00
|
|
|
alias gitrm='git rm $(git ls-files --deleted)'
|
|
|
|
|
|
|
|
# dandelion deployment shortcuts
|
2012-05-28 14:38:01 +00:00
|
|
|
alias deploy='dandelion deploy'
|
|
|
|
alias status='dandelion status'
|
2012-07-02 10:19:54 +00:00
|
|
|
|
2012-08-26 17:07:30 +00:00
|
|
|
# grunt
|
|
|
|
alias grw='grunt watch'
|
|
|
|
alias grd='grunt deploy'
|
2012-09-06 18:28:31 +00:00
|
|
|
|
|
|
|
# other tools
|
|
|
|
alias cw='compass watch'
|
2012-08-26 17:07:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
### some custom functions ###
|
2012-05-28 14:38:01 +00:00
|
|
|
# use ffmpeg to create nice web-videos and a jpg-still
|
|
|
|
ffencode () {
|
|
|
|
ffmpeg -i $1 -vcodec libx264 -vprofile high -preset slow -vb 1000k -maxrate 1000k -bufsize 2000k -vf scale="854:trunc(ow/a/2)*2" -threads 0 -ab 128k video-low.mp4;
|
|
|
|
ffmpeg -i $1 -vcodec libx264 -vprofile high -preset slower -vb 1800k -vf scale="1280:trunc(ow/a/2)*2" -threads 0 -ab 224k video-high.mp4
|
|
|
|
ffmpeg -i $1 -vcodec libvpx -quality good -cpu-used 0 -vb 1000k -maxrate 1000k -bufsize 2000k -qmin 10 -qmax 42 -vf scale="854:trunc(ow/a/2)*2" -threads 0 -acodec libvorbis -ab 128k video-low.webm;
|
|
|
|
ffmpeg -i $1 -vcodec libvpx -quality good -cpu-used 0 -vb 1800k -maxrate 1800k -bufsize 3600k -qmin 10 -qmax 42 -vf scale="1280:trunc(ow/a/2)*2" -threads 0 -acodec libvorbis -ab 224k video-high.webm;
|
|
|
|
ffmpeg -i $1 -ss 00:00:05.01 -y -f image2 -vcodec mjpeg -vframes 1 -s hd720 video-high.jpg
|
|
|
|
ffmpeg -i $1 -ss 00:00:05.01 -y -f image2 -vcodec mjpeg -vframes 1 -s hd480 video-low.jpg
|
|
|
|
mp4box -inter 500 -hint video-high.mp4
|
|
|
|
mp4box -inter 500 -hint video-low.mp4
|
|
|
|
}
|
|
|
|
|
|
|
|
# rvm ftw!
|
|
|
|
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
|