ip aliases

This commit is contained in:
Matthias Kretschmann 2021-02-16 21:42:11 +01:00
parent 39577ccc06
commit 599dc8ab40
Signed by: m
GPG Key ID: 606EEEF3C479A91F
3 changed files with 6 additions and 3 deletions

View File

@ -14,7 +14,9 @@ alias n='nova .'
alias update='update-everything.sh'
# IP addresses
alias ip="dig TXT +short o-o.myaddr.l.google.com @ns1.google.com"
# https://unix.stackexchange.com/a/81699/37512
alias ip="dig @resolver4.opendns.com myip.opendns.com +short"
alias ip6="dig @resolver1.ipv6-sandbox.opendns.com AAAA myip.opendns.com +short -6"
alias iplocal="ipconfig getifaddr en0"
# Copy SSH public key to pasteboard

View File

@ -12,6 +12,7 @@
function updateIp {
# IPv4 A record
# https://unix.stackexchange.com/a/81699/125382
IPADDRv4=$(dig @resolver4.opendns.com myip.opendns.com +short)
echo "Public IPv4: $IPADDRv4"

View File

@ -26,7 +26,7 @@ export CDPATH=$CDPATH:~/Code
# nvm
# defer loading until needed for faster shell startup
# declare -a NODE_GLOBALS=(`find ~/.nvm/versions/node -maxdepth 3 -type l -wholename '*/bin/*' | xargs -n1 basename | sort | uniq`)
#
# NODE_GLOBALS+=("node")
# NODE_GLOBALS+=("nvm")
@ -41,6 +41,6 @@ load_nvm
# done
# pip should only run if there is a virtualenv currently activated
#export PIP_REQUIRE_VIRTUALENV=true
export PIP_REQUIRE_VIRTUALENV=true
# cache pip-installed packages to avoid re-downloading
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache