What a list of gems!
Also, I noticed you can rewrite this function:
# Copy an ip address from a domain
# Usage cip domain.com
function cip() {
ip=$(resolveip -s $1)
echo $ip | xsel -b
echo $ip
}
as a oneliner without needing process substitution or echo: function cip() {
resolveip -s $1 | tee /dev/fd/2 | xsel -b
}