Created
January 14, 2014 21:38
-
-
Save chesster/8426270 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
ZSH_CUSTOM=$HOME/.oh-my-zsh-custom | |
ZSH_THEME="" | |
plugins=(bundle brew gem git git-flow debian django pip python rails rake svn terminator wakeonlan) | |
vd() { wget --no-check-certificate -c http://files.malik.pro/$1 } | |
avd() { aria2c -c http://files.malik.pro/$1 } | |
gt() { grep --color=always -n -Rs $1 . } | |
gtf() { grep -Rl $1 . } | |
h() { cat $HISTFILE | grep $1 } | |
heroEncode() { HandBrakeCLI -t 1 -c 1-21 -f mp4 -w 480 -l 272 –crop 0:0:0:0 -e x264 -b 384 -2 -T -r 24 -a 1 -E faac -B 160 -R 44.1 -6 stereo -D 1 -x ref=2:me=umh:cabac=0:bframes=0 -C 8 -v -i $1 -o $1.mp4 } | |
loadsource(){ | |
if [[ -f $1 ]]; then | |
source $1; | |
fi | |
} | |
screenshot() { | |
scrot '%y%m%d-%H%M%S-odesk.png' -e 'convert $f -crop 1680x1050+0+0 ~/odesk/$f ; rm $f' | |
} | |
screenme() { | |
cd; | |
while true; do; | |
sleep 180 && echo "screenshot in 3 secs" | aosd_cat -x 800 -y -35 -R yellow; screenshot; echo -n"screen.." ; date +%D_%X; | |
done; | |
} | |
clickme() { | |
while true; do; | |
xte 'key Meta_L'; | |
echo $i; | |
sleep 1.7; | |
done; | |
} | |
clickmehard() { | |
for i in {0..1000}; do; | |
xte 'key Home'; | |
echo $i; | |
sleep 0.1; | |
done; | |
reset; | |
} | |
filealias(){ | |
if [[ -f $2_$HOST ]]; then | |
alias -g $1="$2_$HOST"; | |
else | |
alias -g $1="$2"; | |
fi | |
} | |
sdiff() { | |
svn diff "${@}" | colordiff; | |
} | |
cp_p() { | |
SOURCE=$1 | |
if [ -d $2 ] | |
then | |
DESTINATION=$2/`basename $SOURCE` | |
else | |
DESTINATION=$2 | |
fi | |
pv ${SOURCE} | > ${DESTINATION} | |
} | |
git_merge_and_delete() { | |
BRANCHNAME=$1 | |
if [ -n $1 ] | |
then | |
echo "Delete local branch $BRANCHNAME" ; git branch -d $BRANCHNAME; | |
echo "Delete local remote $BRANCHNAME" ; git push origin :$BRANCHNAME; | |
echo "Prune to get rid of remote tracking" ; git branch -dr $BRANCHNAME; | |
else | |
echo "No branch name given" | |
fi | |
} | |
gae(){ | |
python $HOME/bin/.apps/google_appengine/dev_appserver.py $1 | |
} | |
baza-firm(){ | |
cd $HOME/stuff/praca/malik.io/projekty/baza-firm; | |
workon baza-firm; | |
} | |
# loadsource /usr/local/bin/virtualenvwrapper.sh | |
loadsource ~/.fresh/build/shell.sh | |
loadsource /etc/bash_completion.d/virtualenvwrapper | |
loadsource $ZSH/oh-my-zsh.sh; | |
loadsource $HOME/.aliases; | |
loadsource $HOME/.profile | |
loadsource $HOME/.exports; | |
loadsource $HOME/.hosts/zsh_$HOST; | |
loadsource $HOME/.pythonbrew/etc/bashrc | |
loadsource $HOME/.rvm/scripts/rvm | |
# aliasy globalne | |
alias -g ...="../.." | |
alias -g ALL="print -C 1 **/**" | |
alias -g DO="| xargs -n1 " | |
alias -g G="| egrep -i" | |
alias -g GI="| egrep -iv" | |
alias -g F="grep --color=always -n -Rs" | |
alias -g L="| less" | |
alias -g M="| more" | |
alias -g S="| sort" | |
filealias Z ~/.zshrc | |
filealias V ~/.vim_runtime/my_configs.vim | |
filealias VV ~/.vim_runtime/sources_non_forked | |
filealias C ~/.conkyrc | |
# aliasy rozszerzen: | |
alias -s pdf="evince" | |
alias -s {jpg,JPG,jpeg,JPEG,png,PNG,gif,GIF}="tiv" | |
alias -s {mp3,ogg,wav,flac}="mplayer" | |
#alias -s {mpg,mpeg,avi,ogm,wmv,m4v,mp4,mov}="mplayer -idx" | |
alias -s {mpg,mpeg,avi,ogm,wmv,m4v,mp4,mov}="vlc" | |
alias -s {txt}="vim" | |
## Opcje | |
setopt always_to_end | |
setopt auto_resume # jak jakis proces jest w "bg" to przy ponownym wywlownaniu go "fg" zamiast tworzyc nowy | |
setopt autocd # cdkuj automatycznie | |
setopt complete_in_word | |
setopt extended_history | |
setopt extendedglob # kolorki i inne w uzupenianiu | |
setopt hist_ignore_all_dups # ignoruj duplikaty | |
setopt hist_ignore_space # ignoruj puste historie | |
setopt inc_append_history # dodawaj logicznie historie | |
setopt listpacked # mala lista | |
setopt no_always_last_prompt # promptuj na dole | |
setopt nobeep # nie beepuj | |
setopt prompt_cr # printnij \r przed promptem | |
setopt share_history | |
setopt short_loops # pozawalaj na `for file in *.pdf; lp ${file}` | |
setopt prompt_subst | |
## Tytul | |
precmd () {print -Pn "\e]0;%n@%m: %d\a"} # pokazuje user@maszyka:/katalog | |
preexec () { print -Pn "\e]0;$1\a" } # pokazuje co aktualnie odpalam | |
# Customize to your needs... | |
#PATH=$PATH:$HOME/.rvm/bin | |
#PATH=$PATH:$HOME/stuff/bin | |
PS1="$PS1"'$([ -n "$TMUX" ] && tmux setenv TMUXPWD_$(tmux display -p "#D" | tr -d %) "$PWD")' | |
[ -s $HOME/.nvm/nvm.sh ] && . $HOME/.nvm/nvm.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment