Skip to content

Instantly share code, notes, and snippets.

@grocky
Last active June 13, 2017 23:58
Show Gist options
  • Save grocky/97c213d1253d688cc71653ed42c9e565 to your computer and use it in GitHub Desktop.
Save grocky/97c213d1253d688cc71653ed42c9e565 to your computer and use it in GitHub Desktop.
Get GeoLocation for OSX machine with JSON output
#!/usr/bin/env bash
# Requires LocateMe executable (brew install locateme)
LocateMe -f '{"latitude":{LAT}, "longitude":{LON}, "altitude": {ALT}, "speed": {SPD}, "direction": {DIR}, "horizontalAccuracy": {HAC}, "verticalAccuracy": {VAC}, "time": "{TIME}", "host": "{HOST}"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment