Skip to content

Instantly share code, notes, and snippets.

View jgravois's full-sized avatar

john gravois jgravois

View GitHub Profile
@jgravois
jgravois / _webserver.md
Last active May 5, 2026 08:58
a simple guide for getting a local web server set up

Do I have a web server running?


having a web server turned on doesn't necessarily mean you are serving pages on the world wide web. its what allows you to load your own static files (.html, .js etc.) in a browser via http://.

if you're not sure whether or not you have a web server running, no problem! its easy to confirm.

what happens when you visit http://localhost/?

@jgravois
jgravois / hub_v3_search_api_ref.md
Created February 5, 2019 19:37
Hub v3 Search API doc port (February 5th, 2019)
@jgravois
jgravois / bios.md
Last active December 1, 2025 21:21

work:

John Gravois is a developer at Compiler and is currently building https://benefits.calitp.org. 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, mai

@jgravois
jgravois / eleventh-hour.ts
Created June 25, 2025 05:19
i could have used this 30 years ago...
const alphabet = Array.from('abcdefghijklmnopqrstuvwxyz')
const codedMessage = Array.from(`
myxqbkdevkdsyxc!
sd gkc sxnoon usvbyi dro wyeco gry cdyvo dro pokcd. led ro rkn rovz:
yxo rexnbon kxn ovofox yp usvbyi'c pebbi bovkdsfoc rsn drowcovfoc sx
dro ryeco kxn kbyexn dro qkbnox kxn, kd ovofox wsxedoc dy ovofox droi
kvv cmkwzobon sxdy dro lkxaeod rkvv gsdr usvbyi kxn kdo ez kvv yp
rybkmo'c lokedspev pyyn.
@jgravois
jgravois / post.py
Last active April 22, 2022 18:15
what's required to use python requests to POST to AGOL/ArcGIS Server?
import requests
import json
agol_url = r'http://services1.arcgis.com/uRIm5IkWjDXybgFb/arcgis/rest/services/LA_Nhood_Change/FeatureServer/0/query'
server_url = r'http://sampleserver6.arcgisonline.com/arcgis/rest/services/EmergencyFacilities/FeatureServer/0/query'
# i tried several different headers, to no avail
# headers={"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"}
# headers = {"Content-Type": "application/x-www-form-urlencoded", "Accept":"/*/", "Accept-Encoding":"gzip, deflate", "Accept-Language":"en-US,en;q=0.8,ar;q=0.6"}
headers={"content-type":"application/json","Accept":"application/json"}
@jgravois
jgravois / .block
Last active January 1, 2022 06:33
Esri OSM vector tiles in mapbox-gl-js
license: apache-2.0
@jgravois
jgravois / .block
Last active June 6, 2020 02:46
smooth animation in JSAPI 4.x
license: apache-2.0
@jgravois
jgravois / index.html
Created January 8, 2018 20:09
ExtractData widget sample
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Hotspot Analysis</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.23/dijit/themes/claro/claro.css" />
<link rel="stylesheet" href="https://js.arcgis.com/3.23/esri/css/esri.css" />
<style>
@jgravois
jgravois / aphorisms.md
Last active April 10, 2019 00:22
Questionable career advice
@jgravois
jgravois / esri.json
Last active February 5, 2019 21:13
an esri geoservices feature and geojson feature side by side
{
"features": [
{
"geometry": {
"x": -77.068616,
"y": 38.915516,
"spatialReference": {
"wkid": 4326
}
},