Skip to content

Instantly share code, notes, and snippets.

View map.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
oeon / st_intersects_within.sql
Created Jan 12, 2020
where ESA is a polygon layer. Use PostGIS to test in/out
View st_intersects_within.sql
-- inside ESA
UPDATE htmp points SET esa = 'yes'
FROM vm_esa pol
JOIN htmp poi
ON (ST_Within(poi.geom, pol.geom))) inside
WHERE points.legacy_fulcrum_id = inside.legacy_fulcrum_id;
-- outside ESA
oeon / gist.sql
Created Jan 7, 2020
unnested photo array - captions...aggregated back together
View gist.sql
select _record_id, string_agg(unnest, ', ') as photos, string_agg(photos_captions, ', ') as photos_captions from (select r._record_id, r.unnest, k.labels as photos_captions from records r join rek k on = r.unnest order by _record_id) a group by _record_id order by _record_id
oeon / gist:84b54ace2090904ca7ac08f2b1cbdfcc
Created Nov 8, 2019
run this to fix that: RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl" asdf install ruby 2.2.4
View gist:84b54ace2090904ca7ac08f2b1cbdfcc
ruby-build: using openssl from homebrew
Downloading ruby-2.2.4.tar.bz2...
Installing ruby-2.2.4...
WARNING: ruby-2.2.4 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
ruby-build: using readline from homebrew
oeon / fulcrum-routing-data-event.js
Created Oct 27, 2019
Using Fulcrum Data Events for routing with Google Maps and MAPS.ME
View fulcrum-routing-data-event.js
ON('change', 'routing_options', () => {
if ($routing_options == 'google') {
} else {
ALERT('No location provided!', 'A location is required to show Google Maps.')
SETVALUE('routing_options', null);
} else if ($routing_options == 'mapsme') {
let location = CURRENTLOCATION();
View index.html
<iframe width=100% height=100% src=";headers=false"></iframe>

this has been slightly modifed for my use cases ~joe

I've had to deal with uploading big data csv files a lot. It's a pain when you encounter timeouts and upload limits, sometimes your only choice is to split the file into smaller files.

I want to show you how to do this in 3 easy steps with the Terminal!

Splitting the file:

split -l 10000 companies.csv ./split-files/chunk-

Keybase proof

I hereby claim:

  • I am oeon on github.
  • I am oeon ( on keybase.
  • I have a public key ASBW-ZRiTH19DIblcsIb3JYMvdRsa5-xRWBdXcAPL8nnTQo

To claim this, I am signing this object:

oeon /
Created Feb 6, 2019
Google Apps Script for creating Google Calendar events via Fulcrum Webhooks with Location
// Google Apps Script for creating Google Calendar events via Fulcrum Webhooks
// replace your Fulcrum API token here
var token = "";
// leave createEventId as an empty string. We'll get it in createEvent()
var createEventId = "";
function doPost(e) {
return handleResponse(e);
oeon / calc.js
Created Jan 10, 2019
Unix time calculation for Fulcrum date and time fields
View calc.js
var stop = new Date($stop_date.getFullYear(), $stop_date.getMonth(), $stop_date.getDate(), $stop_time.slice(0, 2), $stop_time.slice(3, 5), 0);