Skip to content

Instantly share code, notes, and snippets.

Created December 3, 2013 21:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Update Dynamic DNS record hosted with DNSMadeEasy with current local IP address. This is useful for local web testing on mobile devices on the same WiFi Network
# Auth/DNS Record Details
# Get the IP Address
IP=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '')
# Make the API Request
curl -s "${URL}" > /dev/null
# Clear the local cache
dscacheutil -flushcache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment