Skip to content

Instantly share code, notes, and snippets.

@cdmwebs
Created August 9, 2010 02:35
Show Gist options
  • Save cdmwebs/514848 to your computer and use it in GitHub Desktop.
Save cdmwebs/514848 to your computer and use it in GitHub Desktop.
/bin/echo '{"version": "1.1.0","host": "maps.google.com","request_address": true,"address_language": "en_US", "wifi_towers": [{"mac_address": "' $(/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s | grep -o "\([0-9a-f]\{2\}:\)\{5\}[0-9a-f]\{2\}" | head -1 ) '","signal_strength": 8,"age": 0}]}' | sed -e 's/" /"/' -e 's/ "/"/g' > /tmp/post.$$ && curl -X POST -d @/tmp/post.$$ http://www.google.com/loc/json | sed -e 's/{/\n/g' -e 's/,/\n/g'
@cdmwebs
Copy link
Author

cdmwebs commented Aug 9, 2010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment