Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{"type":"FeatureCollection","features": [{"type": "Feature","geometry": {"type":"Polygon","coordinates":[[[-122.3267301,45.28513456],[-122.32673044,45.28483285],[-122.32759069,45.28483411],[-122.32759002,45.28506321],[-122.32672996,45.2852607],[-122.3267301,45.28513456]]]},"properties":{"id":45798,"name":"Cazadero Heights Neighborhood Park"}},{"type": "Feature","geometry": {"type":"MultiPolygon","coordinates":[[[[-122.46035251,45.48279053],[-122.46027848,45.48222024],[-122.46002897,45.48218988],[-122.45968772,45.48248282],[-122.45966262,45.48246203],[-122.45985418,45.48223987],[-122.4597795,45.48215955],[-122.45933953,45.48210604],[-122.45948647,45.48203295],[-122.45980629,45.48177803],[-122.45984752,45.48136124],[-122.45961897,45.48097717],[-122.45948062,45.48052975],[-122.45924951,45.48052716],[-122.45922683,45.48046288],[-122.45917404,45.48041477],[-122.45929177,45.48030325],[-122.45907828,45.47997177],[-122.4585468,45.47972506],[-122.45855383,45.47847373],[-122.45867689,45.47872343],[-122.45907585,45.4785
@jmoe
jmoe / ridb.rb
Created April 11, 2015 15:16
A quick ruby module for interacting with RIDB API
module RIDB
# A set of client classes for new RIDB API
# https://ridb.recreation.gov/api/v1
# http://ridb-dev.nsitellc.com/docs/api/v1/
# Usage:
# > $ridb = RIDB::Client.new(ENV['RIDB_API_KEY'], debug: true)
# Returns a list of organization items
# > $ridb.organizations.list.items
@jmoe
jmoe / ridb.js
Created April 4, 2015 07:46
RIDB Test
var RIDB = (function(RIDB) {
'use strict';
var _baseurl = "https://ridb-dev.nsitellc.com/api/v1";
var _apikey;
function showResponse(response){
console.log(response);
}
@jmoe
jmoe / easy_click_with_turf.js
Last active August 29, 2015 14:13
Making paths easier to click with turf.js
var pathLayer = L.geoJson(geojsonData, {
onEachFeature: function(feature, layer) {
var buffered = turf.buffer(feature,0.01,'kilometers');
var hoverZone = L.geoJson(buffered).addTo(someMap);
hoverZone.on('mouseover', function() {
// do something
});
hoverZone.on('mouseout', function() {
// do something else
});
@jmoe
jmoe / README.md
Last active August 29, 2015 14:13 — forked from pbeshai/README.md
Run Signatures

Shooting Signatures were designed to give an at-a-glance view of an NBA player's shooting performance. They were developed by Peter Beshai (@pbesh) as part of Buckets, an interactive NBA shot visualization tool.

Shooting Signature Explanation

Sample Shooting Signature usage

Shooting Signatures of NBA Players from the 2013-14 Season
@jmoe
jmoe / multi_json.rb
Created September 11, 2014 17:52
Default MultiJson to pretty
require 'multi_json'
MultiJson.use :yajl
unless Rails.env.production?
MultiJson.dump_options = {:pretty=>true}
end
@jmoe
jmoe / fastly.rake
Last active August 29, 2015 14:06
Quick rake task to automate setting CORS headers on fastly
namespace :fastly do
desc "set fastly cors headers to fix chrome/firefox font loading issues"
task allow_cors: :environment do
# check for the Cors Allow header
versions = Yajl.load(Excon.get("https://api.fastly.com/service/#{ENV['FASTLY_SERVICE_ID']}/version",
:headers => {'Fastly-Key'=>ENV['FASTLY_API_KEY']}).body)
last_version = versions.last['number']
@jmoe
jmoe / areas.geojson
Last active August 29, 2015 14:04
Metro Parks Serving Summit County
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmoe
jmoe / areas.geojson
Last active August 29, 2015 14:04
OpenTrails Embed
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.