Skip to content

Instantly share code, notes, and snippets.

@robtarr
Last active August 29, 2015 13:59
Show Gist options
  • Save robtarr/10984313 to your computer and use it in GitHub Desktop.
Save robtarr/10984313 to your computer and use it in GitHub Desktop.
Code samples for Event Map Foundry post
function geoCode(addr){
var gc = Maps.newGeocoder();
var geoJSON = gc.geocode(addr);
var lat = geoJSON.results[0].geometry.location.lat;
var lng = geoJSON.results[0].geometry.location.lng;
return lat + ", " + lng;
}
set :output, "/log/cron_log.log"
every 1.hour do
command "cd #{server_path} && coffee google.coffee map-data.json"
end
table = tabletop.init
key: "############################################"
callback: (data) =>
# do things
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment