--- /dev/null
+for i in ~/.profile.d/*.bashrc; do . $i; done
+__ps1
+
+unset XMODIFIERS #:-(
+export SSHTERM="urxvt"
+export SSHTERM_TITLE="-title"
+export SSHTERM_EXEC="-e"
+
+if [ "$OSTYPE" = "cygwin" ]; then
+ shopt -s nocaseglob
+fi
+
+#[ "$TERM" = "xterm-color" ] && export TERM=xterm-xfree86
+export PATH=~/bin:"$PATH"
+
+function upload() {
+ if [ $# = 0 ]; then
+ echo usage: upload file [file...]
+ return 100
+ fi
+ pwd=$PWD/
+ pwd=${pwd##/home/iain/www/}
+ if echo $pwd | grep -q ^/; then
+ echo not rooted under /home/iain/www
+ unset pwd
+ return 111
+ fi
+# scp ${1+"$@"} 64.176.170.109:/home/iain/$pwd
+ lftp -c "open web1.viagold.net; cd $pwd; mput $@"
+ unset pwd
+}
+
+function download() {
+ if [ $# = 0 ]; then
+ echo usage: download file [file...]
+ return 100
+ fi
+ pwd=$PWD/
+ pwd=${pwd##/home/iain/www/}
+ if echo $pwd | grep -q ^/; then
+ echo not rooted under /home/iain/www
+ unset pwd
+ return 111
+ fi
+# scp ${1+"$@"} 64.176.170.109:/home/iain/$pwd
+ lftp -c "open web1.viagold.net; cd $pwd; mget $@"
+ unset pwd
+}
+alias debug='valgrind --leak-check=yes --show-reachable=yes --num-callers=5 --verbose'
+
+eval `dircolors -b`
--- /dev/null
+. /etc/profile
+. ~/.bash_profile
--- /dev/null
+set editing-mode vi
+set meta-flag on
+set input-meta on
+set convert-meta off
+set output-meta on
+set bell-style none
+set show-all-if-ambiguous on
+\C-w: backward-kill-word
+\C-l: clear-screen
+$include /etc/inputrc
--- /dev/null
+alias l='ls'
+alias ls='/bin/ls $LS_OPTIONS'
+alias vim='vim +syn\ on'
--- /dev/null
+#export HISTCONTROL=ignoredups
+export HISTTIMEFORMAT='[%Y-%m-%d %H:%M:%S] '
+export HISTFILESIZE=3000
+export HISTSIZE=1000
--- /dev/null
+# Helper!
+export COMPLETION_DIR_SSH=~/.ssh/hosts
+export COMPLETION_DIR_TELNET=~/.telnet/hosts
+export COMPLETION_DIR_RDP=~/.ssh/hosts
+export COMPLETION_DIR_PING="$COMPLETION_DIR_SSH $COMPLETION_DIR_TELNET $COMPLETION_DIR_RDP"
+
+function _generic_completion() {
+ COMPLETION_DIR=${1+"$@"}
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ HOSTS="$(find $COMPLETION_DIR -type f -perm -100 | sed 's@.*/@@')"
+
+ COMPREPLY=($(compgen -W "$HOSTS" -- "$cur"))
+ return 0
+}
+
+# Process completion for killall.
+function _process() {
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ PROCESSES="$(ps agx --no-heading | awk '{ print $5 }' | sed 's@.*/@@' | sort | uniq)"
+
+ COMPREPLY=($(compgen -W "$PROCESSES" -- "$cur"))
+ return 0
+}
+
+# Process completion for kill, strace etc.
+function _pid() {
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ PROCESSES="$(find /proc -name '[0-9]*' -maxdepth 1 | sed 's@.*/@@')"
+
+ COMPREPLY=($(compgen -W "$PROCESSES" -- "$cur"))
+ return 0
+}
+
+# Complete ssh with hostnames from the Window Maker menu.
+function _ssh() {
+ _generic_completion $COMPLETION_DIR_SSH
+ return 0
+}
+
+# Complete telnet with hostnames from the Window Maker menu.
+function _telnet() {
+ _generic_completion $COMPLETION_DIR_TELNET
+ return 0
+}
+
+# Complete rdesktop with hostnames from the Window Maker menu.
+function _rdp() {
+ _generic_completion $COMPLETION_DIR_RDP
+ return 0
+}
+
+# Ping hosts from any of the above lists.
+function _ping() {
+ _generic_completion $COMPLETION_DIR_PING
+}
+
+# Hacked up make rule.
+function _make() {
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ RULES="all check clean dep depend install reinstall setup uninstall"
+
+ COMPREPLY=($(compgen -W "$RULES" -- "$cur"))
+ return 0
+}
+
+complete -F _ssh rollout
+complete -F _ssh ssh
+complete -F _ssh sshterm
+complete -F _ping telnet
+complete -F _telnet telnetterm
+complete -F _rdp rdesktop
+complete -F _ping ping
+complete -F _ping traceroute
+complete -F _ping dnsip
+complete -F _make make
+complete -F _process killall
+complete -F _pid kill
+complete -F _pid strace
--- /dev/null
+# VERSION 1.2 (2001-10-31)
+#
+# coloured prompts for bash
+#
+# prompt is user@host:/dir$ where host is highlighted in green if the last
+# command exited 0 or in red (followed by the error code) otherwise
+#
+# to use, add a call to __ps1 in your .bash_profile
+
+export PROMPT_OK_COLOUR=32
+export PROMPT_FAILED_COLOUR=31
+
+function __ps1() {
+ export PS1='\u@\[\033[1;$(__ps1_col $?)m\]\h\[\033[0m\]$(__ps1_ret $?):\w\$ '
+ return 0
+}
+
+function __ps1_col() {
+ [ $1 -gt 0 ] && echo -n "$PROMPT_FAILED_COLOUR" || echo -n "$PROMPT_OK_COLOUR"
+ return $1
+}
+
+function __ps1_ret() {
+ [ $1 -gt 0 ] && echo -n " ($1)"
+ return 0
+}
--- /dev/null
+if [ ! -z "$SSH_CLIENT" ]; then
+ # Set display if we aren't already forwarding X11
+ if [ "$DISPLAY" = "" ]; then
+ export DISPLAY="$(echo $SSH_CLIENT | cut -s -d ' ' -f 1):0"
+ fi
+fi
+
+# Try to hook up with already running ssh-agent.
+if [ $UID -gt 0 ]; then
+ RUNNING_AGENT="$(ps waux | grep -- ^$USER\ .\*ssh-agent\ -s | grep -v grep | awk '{ print $2 }' | head -n 1)"
+ if [ -z "$SSH_AGENT_PID" -o ! "$SSH_AGENT_PID" = "$RUNNING_AGENT" ]; then
+ export SSH_AGENT_PID="$RUNNING_AGENT"
+ if [ "$SSH_AGENT_PID" = "" ]; then
+ unset SSH_AGENT_PID
+ unset SSH_AUTH_SOCK
+ # Start ssh-agent up then.
+ eval $(/usr/bin/ssh-agent -s)
+ trap "kill $SSH_AGENT_PID" 0
+ ssh-add
+ else
+ export SSH_AUTH_SOCK="/$(lsof -p $SSH_AGENT_PID | grep 'agent.[0-9]*$' | cut -s -d / -f 2-)"
+ fi
+ fi
+ unset RUNNING_AGENT
+fi
--- /dev/null
+export SSHTERM=urxvtc
+export SSHTERM_TITLE=-title
+export SSHTERM_EXEC=-e
+#export TERM=xterm-xfree86
+export TERM=linux
+export LC_CTYPE=en_GB
+export LS_OPTIONS="--color=auto -F -b"
+export VISUAL=vim
+eval `dircolors`
--- /dev/null
+se ts=2
+se bs=2
+se sw=2
+se expandtab
+se ruler
+se cindent
+se cinkeys=0{,0},0),:,!^F,o,O,e
+se showcmd
+se go=agilmrtT
+se incsearch
+se ignorecase
+se smartcase
+se shm=aot
+syn enable
+if has("gui_running")
+ se guifont=Bitstream\ Vera\ Sans\ Mono\ 12
+ colo darkblue
+endif
+if has("win32")
+ se guifont=Bitstream_Vera_Sans_Mono:h10:cANSI
+endif
+map <C-"> viwvbi"<ESC>ea"<ESC>
+map - yyp:s/./-/g<RETURN>:let @/=''<RETURN>:<RETURN>
+map = yyp:s/./=/g<RETURN>:let @/=''<RETURN>:<RETURN>
+command W :w
+:autocmd!
+autocmd Syntax c se cinkeys=0{,0},0),:,0#,!^F,o,O,e
+autocmd Syntax perl se cinkeys=0{,0},0),:,!^F,o,O,e
+autocmd Syntax php se cinkeys=0{,0},0),:,!^F,o,O,e