Skip to content

Instantly share code, notes, and snippets.

View cmiles74's full-sized avatar

Christopher Miles cmiles74

View GitHub Profile
@cmiles74
cmiles74 / gist:ef62e43595deabb68f5a
Created May 28, 2015 14:50
Sample GeoJSON Feature Data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cmiles74
cmiles74 / gist:9647587
Last active August 29, 2015 13:57
"ETL for America": some of my thoughts on the *other* @codeforamerica problem

Just thinking out-loud: a service that collects and aggregates publicly available data, then allows the customer to choose from a series of visualizations or charts (map, graph, tabular, etc.) with a set of query options (geographical area, date range, etc.) that can be embedded in a web page (i.e. on the customer's website). Terms of the service would allow the sharing and aggregation of all supplied data (the entire data set would be publicly available).

ETL is a challenging problem, often doing something constructive with the end result is just as difficult. Providing one place to send this data might help motivate organizations to sink in the time and money to do the work, as well as providing a structure for their ETL processes to target. Perhaps the company that provides this service might also provide consulting services to help customers setup a reliable ETL process.

Maybe another idea for a @CodeForAmerica project?

@cmiles74
cmiles74 / gist:9243500
Created February 27, 2014 02:56
Keybase Proof
### Keybase proof
I hereby claim:
* I am cmiles74 on github.
* I am cmiles74 (https://keybase.io/cmiles74) on keybase.
* I have a public key whose fingerprint is 36CE 2111 1084 FEB8 8869 B54A 2658 C82C D3F8 5380
To claim this, I am signing this object:
@cmiles74
cmiles74 / gist:5929534
Created July 4, 2013 18:32
Notmuch + Emacs Stach Trace
Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p Unrecognized)
#[(elem) "...unpaste-able junk..."
mapcar(#[(elem) "...unpaste-able junk..."
notmuch-hello-query-counts((("inbox" . "tag:inbox") ("unread" . "tag:unread")) :show-empty-searches nil)
notmuch-hello-insert-saved-searches()
#[(section) "...unpaste-able junk..."
notmuch-hello()
notmuch()
call-interactively(notmuch record nil)
command-execute(notmuch record)
@cmiles74
cmiles74 / gist:5884296
Created June 28, 2013 12:22
JBehave Test, Nearly Working
package gov.ny.dec.pesticides.web.internal.component.course.addattendee;
import gov.ny.dec.pesticides.service.course.CourseHeaderService;
import org.jbehave.core.Embeddable;
import org.jbehave.core.configuration.Configuration;
import org.jbehave.core.configuration.MostUsefulConfiguration;
import org.jbehave.core.i18n.LocalizedKeywords;
import org.jbehave.core.io.CodeLocations;
import org.jbehave.core.io.LoadFromClasspath;
import org.jbehave.core.junit.JUnitStory;
@cmiles74
cmiles74 / gist:3933416
Created October 22, 2012 19:04
Current Mappings
{
state: open
settings: {
index.analysis.analyzer.default.filter.1: lowercase
index.analysis.analyzer.default.filter.2: stop
index.analysis.analyzer.default.filter.0: standard
index.number_of_replicas: 0
index.analysis.analyzer.default.char_filter.0: html_strip
index.number_of_shards: 3
index.analysis.analyzer.default.filter.3: asciifolding
@cmiles74
cmiles74 / gist:3933367
Created October 22, 2012 18:53
Sample Facet Query with Filter
{
"query": {
"match_all": {}
},
"facets": {
"tag": {
"terms": {
"field": "skillkeys",
"size": 10
},
(defn q [x]
(let [
y (map #(int %) (str x))
a (int (Math/floor (/ (count y) 2.0)))
]
(= (apply + (take a y))
(apply + (take-last a y))
)))
(time (take 20 (filter q (range))))
@cmiles74
cmiles74 / gist:3017680
Created June 29, 2012 12:37
Emacs 24.1 Fullscreen Patch (Classic, not Lion)
diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el
index 157b2dd..f3807b7 100644
--- a/lisp/term/ns-win.el
+++ b/lisp/term/ns-win.el
@@ -1263,6 +1263,11 @@ the operating system.")
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()
@cmiles74
cmiles74 / gist:2473449
Created April 23, 2012 20:02
Tmciver's Sample
(ns ftk.bishop-server
(:require [com.tnrglobal.bishop.core :as bishop]
[ring.adapter.jetty :as ra])
(:import [java.util Date]))
;; defines a resource that says hello
(def hello
(bishop/resource
{"text/html" (fn [request]
{:body (str "<html><body><p>Hello "