Linux

Get public IP:

curl ifconfig.so