Skip to content

Commit

Permalink
Utility to determine public IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinpinto committed Apr 4, 2024
1 parent c2ab64d commit c1371c8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions dotfiles/dot_bashrc.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,12 @@ function drma() {
docker rmi -f $untagged
fi
}

# Check public IP address (respects the ALL_PROXY environment variable)
function myip() {
# some other options:
# curl https://checkip.amazonaws.com
# curl https://icanhazip.com
# curl https://ifconfig.co
echo "Public IP address: $(curl -s 'https://checkip.amazonaws.com')"
}

0 comments on commit c1371c8

Please sign in to comment.