Created
March 4, 2013 08:58
-
-
Save pkhamre/5080945 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
# GPG Public key for: Pål-Kristian Hamre (Devops guy) <[email protected]> | |
export GPGKEY=AB3A7698 | |
export JAVA_HOME="/opt/jdk-1.6.0_38-linux-x64/" | |
export JDK_HOME="/opt/jdk-1.6.0_38-linux-x64/" | |
#export JAVA_HOME="/usr/lib/jvm/java-6-openjdk-amd64/" | |
export PATH=~/bin/:${PATH} | |
export MAVEN_OPTS='-Xms512m -XX:MaxPermSize=1024m -Xmx2048m' | |
# Set TERM to xterm | |
export TERM=xterm | |
export TERMINAL=urxvt | |
# Set vim as the default editor | |
export EDITOR=vim | |
# Bash completion | |
source /etc/bash_completion | |
export LANG=en_US.UTF-8 | |
export LC_MESSAGES=POSIX | |
# Bash history | |
export HISTCONTROL="ignoredups:ignorespace" | |
export HISTFILESIZE=16384 | |
export HISTSIZE=16384 | |
export HISTTIMEFORMAT="%F %T " | |
# Fancy shellprompt | |
export NO_COLOR='\e[0m' | |
export RED='\e[0;31m' | |
export GREEN='\e[0;32m' | |
export BLUE='\e[0;34m' | |
export MAGENTA='\e[0;35m' | |
export PROMPT_COMMAND='RET=$?;' | |
export RET_SMILEY='$(if [[ $RET = 0 ]]; then echo -ne "\[$GREEN\]:)"; else echo -ne "\[$RED\]:("; fi;)' | |
export PS1="\[$(tput sgr0)$(tput setaf 5)\]\u@\h\[$(tput sgr0)\]:\[$(tput sgr0)$(tput setaf 4)\]\w\[$(tput sgr0)$(tput setaf 2)\] $RET_SMILEY \[$(tput sgr0)\]" | |
unset GNOME_KEYRING_CONTROL | |
unset GNOME_KEYRING_PID | |
alias mkpass='/usr/bin/apg -MSNC -n 1 -m 16 -E I[]1O0S5' | |
unixtime () { | |
if [ -n "$1" ]; then | |
TIMESTAMP=${1} | |
else | |
TIMESTAMP=123 | |
fi | |
echo ${TIMESTAMP} | gawk '{ print strftime("%c", $0) }' | |
} | |
testmail () { | |
if [ -n "$1" ]; then | |
uuid=$(cat /proc/sys/kernel/random/uuid); | |
msgid_domain=$(hostname --fqdn); | |
sendmail -oi -t <<EOF | |
Subject: test - $uuid | |
Message-Id: <testmail.$uuid@$msgid_domain> | |
To: <$1> | |
Test mail with identifier $uuid | |
-- | |
Regards, | |
$LOGNAME | |
EOF | |
if [ "$?" = 0 ]; then | |
echo "$uuid -> $1"; | |
else | |
echo "not sent"; | |
fi; | |
else | |
echo "Usage: testmail <rcpt>"; | |
fi | |
} | |
export PATH="$HOME/.local/bin:$PATH" | |
eval "$(ry setup)" | |
source /etc/bash_completion.d/password-store |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment