Skip to content

Instantly share code, notes, and snippets.

View jgravois's full-sized avatar

john gravois jgravois

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
koop install terminal 6/29/2014
failed to npm install because i had somehow laid down a 'pre' version of node
with Andrew Wang 7/15/2014
overcame an error starting up the node server by calling npm update on koop's dependencies
with Mike Juniper 7/16/2014
pointed out that my koop adaptors weren't installed properly
afterward, i could run the gist and github previews once, but thats it

work:

John Gravois is a developer at https://scripto.live. Previously, as a Software Engineer at Esri, he helped build ArcGIS Hub, maintained a handful of Leaflet plugins and coordinated with developers across the company to steer Open Source strategy. He has a tattoo of a California Raisin and when he's not in front of a computer you can often find him tangled up in poison oak somewhere near his bicycle.

bikes:

John discovered the joys of commuting by bike on the friendly streets of Los Angeles in 2005. He served as a Director of the Sacramento Bicycle Kitchen, a nonprofit, "Do It Yourself" repair shop and is also a qualified League Certified Instructor (#2307). John has taught bicycle repair, maintenance and safety classes all over California. He founded [Bike

@jgravois
jgravois / gist:b0b1f3389a077e55d1fc
Created August 6, 2014 21:48
android-geotrigger
8/5
installed android studio
downloaded version 1.0.2 of android geotrigger sdk
opened project in android studio by pointing at example project folder from zip file
added geotrigger-sdk-1.0.2.jar from same project as a module dependency
50 credits gives you 600 geocodes, 2400/month for $20
things that were a little unclear in the doc (to android newbs anyway)
'To include the library in Android Studio or IntelliJ IDEA, add the library as a dependency in your module settings.'
@jgravois
jgravois / bootstrap-fix.js
Created August 6, 2014 21:52
bootstrap-webmap-fix
<!--add id to dom element we want to listen to click event on-->
<h4 class="panel-title">
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion0" href="#collapseOne0" id="accordianTitle">
Title
</a>
</h4>
//...
//event listener is triggered before the pane has finished resizing, so we need to wait a bit
on(dom.byId("accordianTitle"), "click", function(){
window.setTimeout(function(){map.reposition();}, 1000);
@jgravois
jgravois / Node-service.js
Last active August 29, 2015 14:05
crude bikeshare usage counter
var express = require('express');
var cors = require('cors');
var app = express();
app.use(cors());
var defaultResponse = {
"network": {
"name": "BikeBBQ",
"stations": [{
@jgravois
jgravois / index.html
Last active October 12, 2015 01:54
add webmap from JSON instead of ArcGIS Online in Viewer.
<script type="text/javascript" src="./config/webmap.js"></script>
<!--existing tag-->
<script type="text/javascript" src="//js.arcgis.com/3.10/"></script>
@jgravois
jgravois / module.js
Created October 10, 2014 23:26
referencing your own AMD module
//lets say this resides in 'myfolder' next to the app itself
define([
"dojo/_base/declare",
"esri/tasks/query",
//...
],
function (
declare, Query //, ...) {
@jgravois
jgravois / gdi-demo.js
Last active August 29, 2015 14:09
mashing up geojson and esri feature layers in leaflet
//create map and add esri basemap
var map = L.map('map').setView([38.896, -77.0375], 13);
L.esri.basemapLayer("Gray").addTo(map);
/*load geojson schools directly from github
https://github.com/calvinmetcalf/leaflet-ajax*/
var schools = new L.GeoJSON.AJAX("dc-schools.geojson", {
onEachFeature: bindPopups
});
schools.addTo(map);
@jgravois
jgravois / geojson.json
Last active August 29, 2015 14:09
example of geojson
{
"type": "Feature",
"id": "1",
"geometry": {
"type": "Point",
"coordinates": [
-77.068616,
38.915516
]
},