# Path to your oh-my-zsh configuration. ZSH=$HOME/.oh-my-zsh # 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="af-magic" # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" alias vi="vim" # Set to this to use case-sensitive completion # CASE_SENSITIVE="true" # Comment this out to disable bi-weekly auto-update checks # DISABLE_AUTO_UPDATE="true" # Uncomment to change how many often would you like to wait before auto-updates occur? (in days) # export UPDATE_ZSH_DAYS=13 # 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" # Example format: plugins=(rails git textmate ruby lighthouse) #ALIASES alias update="yaourt -Syua --noconfirm" alias ducks="du -cksh * | sort -rn | head" alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' bindkey "\033[1~" beginning-of-line bindkey "\033[4~" end-of-line plugins=(git archlinux) source $ZSH/oh-my-zsh.sh # Customize to your needs... export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11R6/bin export PYTHONPATH=/usr/lib/python3.4/site-packages # Aktuelle LS Colors fällt auf die fresse? # export LS_COLORS="rs=0:di=01;96:ln=04;01;35:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30; 43:ca=30;41:tw=30;42:$" function detect-ddos { $ sudo netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort - n $ } function ipt-block { sudo iptables -A INPUT -s $1 -j DROP echo "permblocked $1" } function update-blacklist { CHAINLIST=$(sudo /sbin/iptables -nL | grep 'Chain block-traffic-from-openbl' | cut -d\ -f 2) if [ -z $CHAINLIST ]; then sudo /sbin/iptables -N block-traffic-from-openbl sudo /sbin/iptables -A INPUT -j block-traffic-from-openbl fi BLACKLIST=$(/usr/bin/curl -fs http://www.openbl.org/lists/base_7days.txt.gz | gunzip | egrep "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1, 3}\.[0-9]{1,3}") if [ $? -ne 0 ]; then echo "Blacklist download failed." exit fi sudo /sbin/iptables -F block-traffic-from-openbl IPCOUNT=$(echo $BLACKLIST | tr ' ' '\n' | wc -l) echo "Adding $IPCOUNT IPs to blacklist. - $(date)" echo $BLACKLIST | tr ' ' '\n' | while read -r line ; do case "$line" in \#*) continue ;; esac sudo /sbin/iptables -A block-traffic-from-openbl -p tcp -s $line -j REJECT --reject-with tcp-reset done } PATH="$HOME/perl5/bin${PATH+:}${PATH}"; export PATH; PERL5LIB="$HOME/perl5/lib/perl5${PERL5LIB+:}${PERL5LIB}"; export PERL5LIB; PERL_LOCAL_LIB_ROOT="$HOME/perl5${PERL_LOCAL_LIB_ROOT+:}${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT; PERL_MB_OPT="--install_base \"$HOME/perl5\""; export PERL_MB_OPT; PERL_MM_OPT="INSTALL_BASE=$HOME/perl5"; export PERL_MM_OPT;