Skip to content

Instantly share code, notes, and snippets.

View mrcnc's full-sized avatar

Marc Cenac mrcnc

View GitHub Profile
@mrcnc
mrcnc / neighborhoods.json
Created February 11, 2017 21:16
new orleans neighborhood statistical areas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrcnc
mrcnc / useful-links.md
Last active November 14, 2018 04:45
Useful links to open data in the New Orleans area
@mrcnc
mrcnc / core.clj
Last active December 13, 2017 10:07
clojure.spec at NOFUN
(ns nofun.spec.core
(:gen-class)
(:require [clojure.spec :as s]
[clojure.spec.gen :as gen]
[com.gfredericks.test.chuck.generators :as gen']
[camel-snake-kebab.core :refer :all]
[camel-snake-kebab.extras :refer [transform-keys]]))
;; require the namespace
(require '[clojure.spec :as s])
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrcnc
mrcnc / evacuspots.geojson
Last active March 8, 2017 21:02
evacuspots as geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrcnc
mrcnc / index.html
Last active September 3, 2016 19:44
translate arcgis json to geojson using esri's terraformer
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="http://openlayers.org/en/v3.17.1/css/ol.css" type="text/css">
<script src="http://openlayers.org/en/v3.17.1/build/ol.js"></script>
<script src="http://cdn-geoweb.s3.amazonaws.com/terraformer/1.0.4/terraformer.min.js"></script>
<script src="http://cdn-geoweb.s3.amazonaws.com/terraformer-arcgis-parser/1.0.4/terraformer-arcgis-parser.min.js"></script>
<style>
html, body, #map {
margin:0; padding:0; width : 100%; height : 100%;
@mrcnc
mrcnc / index.html
Last active August 18, 2016 06:44
map with data about floods
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/leaflet/1.0.0-rc.2/leaflet.css" />
<script src="https://cdn.jsdelivr.net/leaflet/1.0.0-rc.2/leaflet.js"></script>
<script src="https://cdn.jsdelivr.net/leaflet.esri/2.0.2/esri-leaflet.js"></script>
<style>
html, body, #map {
margin:0; padding:0; width : 100%; height : 100%;
}
@mrcnc
mrcnc / app.js
Created November 20, 2014 16:30
how do i make this work with async?
app.get('/savedTracks', function (req, res) {
var savedTracks = [];
// get users
User.find().limit(10).exec(function(err, users) {
var numberOfAsyncRequests = users.length;
// for each user, get their saved tracks and add to the array of savedTracks
@mrcnc
mrcnc / mediaApi.js
Created August 20, 2014 14:48
a fix for accessing the brightcove api through a corporate proxy
// api reference: http://docs.brightcove.com/en/media/
// object reference: http://support.brightcove.com/en/docs/media-api-objects-reference
// test token taken from brightcove example: 0Z2dtxTdJAxtbZ-d0U7Bhio2V1Rhr5Iafl5FFtDPY8E.
//
// service: http://api.brightcove.com/services
var events = require('events'),
util = require('util'),
http = require('http'),