Skip to content

Instantly share code, notes, and snippets.

@digizeph
Created September 14, 2013 00:20
Show Gist options
  • Select an option

  • Save digizeph/6557654 to your computer and use it in GitHub Desktop.

Select an option

Save digizeph/6557654 to your computer and use it in GitHub Desktop.
Mac OS X: Open up Google Maps to show the place you type in as arguments. For example: ./map.sh University of Oregon, Eugene OR, and it will pop up a Chrome browser, open Google Maps, gives you the map of University of Oregon.
#!/bin/bash
open http://maps.google.com/?ll=$(python -c "from geopy import geocoders as gc; from sys import argv;_,lat = gc.GoogleV3().geocode(' '.join(argv[1:])); print '%s,%s'%(lat[0],lat[1])" $@)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment