Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #########################################################################################################
- ### ###
- ### SETTINGS ###
- ### ###
- #########################################################################################################
- # If not running interactively, don't do anything
- [ -z "$PS1" ] && return
- # set editor
- export EDITOR=vim
- export VISUAL=vim
- # meer settings
- export PAGER=less
- export BROWSER=firefox
- export LC_ALL=en_US.utf8
- export OS=$(uname)
- # set default shell
- export SHELL="$( which bash)"
- # set mailadres
- # complete things that have been typed in the wrong case
- set completion-ignore-case on
- # notify when jobs running in background terminate
- set -o notify
- # no empty completion (bash>=2.04 only)
- shopt -s no_empty_cmd_completion
- # (core file size) don't want any coredumps
- ulimit -S -c 0
- # don't want my shell to warn me of incoming mail
- unset MAILCHECK
- # set tmpfile
- export TMP="${HOME}/tmp"
- # set custom ps1
- export PS1='\[\033]0;\h:\w\007\]\[\033[01;32m\]\u@\h \[\033[01;34m\]\w \$ \[\033[00m\]'
- #
- # PATH SETTINGS:
- #
- PATH='/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin'
- # mac toepassing
- if [ -d /usr/local/MacGPG2/bin ] ; then
- PATH="${PATH}:/usr/local/MacGPG2/bin"
- fi
- # x11 toolbox
- if [ -d /usr/X11/bin ] ; then
- PATH="${PATH}:/usr/X11/bin"
- fi
- # scripts
- if [ -d "$HOME/scripts" ] ; then
- PATH="$HOME/scripts:$PATH"
- fi
- # home bin
- if [ -d "$HOME/bin" ] ; then
- PATH="${PATH}:$HOME/bin"
- fi
- # remove duplicate path entries
- export PATH=$(echo $PATH | awk -F: '
- { for (i = 1; i <= NF; i++) arr[$i]; }
- END { for (i in arr) printf "%s:" , i; printf "\n"; } ')
- # autocomplete ssh commands
- complete -W "$(echo `cat ~/.bash_history | egrep '^ssh ' | sort | uniq | sed 's/^ssh //'`;)" ssh
- # check the window size after each command and, if necessary,
- # update the values of LINES and COLUMNS.
- shopt -s checkwinsize
- # history settings:
- shopt -s histappend
- PROMPT_COMMAND='history -a'
- # don't put duplicate lines in the history.
- HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
- # ... or force ignoredups and ignorespace
- HISTCONTROL=ignoreboth
- # Ctrl+D conveniently exits Bash Sometimes too conveniently
- export IGNOREEOF=1
- # make less more friendly for non-text input files, see lesspipe(1)
- [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
- # enable color support of ls and also add handy aliases
- if [ -x /usr/bin/dircolors ]; then
- eval "`dircolors -b`"
- alias ls='ls --color=auto'
- alias dir='dir --color=auto'
- alias vdir='vdir --color=auto'
- alias grep='grep --color=auto'
- alias fgrep='fgrep --color=auto'
- alias egrep='egrep --color=auto'
- fi
- #########################################################################################################
- ### ###
- ### BASH COMPLETION ###
- ### ###
- #########################################################################################################
- # enable programmable completion features (you don't need to enable
- # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
- # sources /etc/bash.bashrc).
- if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
- . /etc/bash_completion
- fi
- #########################################################################################################
- ### ###
- ### FUNCTIES ###
- ### ###
- #########################################################################################################
- # set custom functions
- if [ -f /media/filestore/user/.bash_functions ]; then
- . /media/filestore/user/.bash_functions
- fi
- #########################################################################################################
- ### ###
- ### ALIASSEN ###
- ### ###
- #########################################################################################################
- # set custom aliasses
- if [ -f /media/filestore/user/.bash_aliases ]; then
- . /media/filestore/user/.bash_aliases
- fi
- #########################################################################################################
- ### ###
- ### KEYCHAIN en GPG SETTINGS ###
- ### ###
- #########################################################################################################
- # tel keymanager his key id
- export GPGKEY='YOURPGPKEYIDHERE'
- # tel keymanager where his keys are:
- export GNUPGHOME='~/.gnupg'
- # load ssh keys in from keymanager
- if [ -f ${HOME}/.keychain/$HOSTNAME-sh ] ; then
- source ${HOME}/.keychain/$HOSTNAME-sh
- fi
- #########################################################################################################
- ### ###
- ### LEUK ###
- ### ###
- #########################################################################################################
- # echo birthday
- [ "$(date | cut -d ' ' -f 2,3)" == "Sep 11" ] && echo "happy birthday motherfucker!"
- # Brute force way to block all LSO cookies on Linux system with non-free Flash browser plugin
- for A in ~/.adobe ~/.macromedia ; do ( [ -d $A ] && rm -rf $A ; ln -s -f /dev/null $A ) ; done
- # greeting
- hour=$(date +"%H")
- if [ $hour -ge 0 -a $hour -lt 12 ]
- then
- greet="Good Morning, $USER.\n"
- elif [ $hour -ge 12 -a $hour -lt 18 ]
- then
- greet="Good Afternoon, $USER.\n"
- else
- greet="Good Evening, $USER..\n"
- fi
- echo -e "${greet}"
- # holiday greeting
- day=$(date +"%B%e")
- year=$(date +"%Y")
- hol=1
- if [ "$day" = "January1" ]
- then
- holgreet='Happy New Years. Have a Happy $year.\n'
- elif [ "$day" = "July4" ]
- then
- holgreet='Have a Happy Forth of July.\n'
- elif [ "$day" = "October31" ]
- then
- holgreet='Happy Halloween.\n'
- elif [ "$day" = "December24" ]
- then
- holgreet='Merry Christmas Eve.\n'
- elif [ "$day" = "December25" ]
- then
- holgreet='Merry Christmas.\n'
- elif [ "$day" = "December31" ]
- then
- holgreet='Happy New Years Eve.\n'
- else
- hol=0
- fi
- # display holiday greeting
- if [ "$hol" = "1" ]
- then
- echo -e "${holgreet}"
- elif [ "$hol" = "0" ]
- then
- randomvarthatsomehowimportant=0
- fi
Advertisement
Add Comment
Please, Sign In to add comment