Skip to content

Instantly share code, notes, and snippets.

View gavinr's full-sized avatar

Gavin Rehkemper gavinr

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gavinr
gavinr / st-louis-county-parks.geojson
Last active August 29, 2015 14:00 — forked from anonymous/arcgis-json-to-geojson.geojson
St. Louis County Parks 2014
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gavinr
gavinr / city-flags.json
Last active August 29, 2015 14:12
US City Flags JSON
[
{
"City":"Bayonne",
"State":"New Jersey",
"Link":"http://en.wikipedia.org/wiki/Bayonne,_New_Jersey",
"Image":"http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Flag_of_Bayonne%2C_New_Jersey.png/180px-Flag_of_Bayonne%2C_New_Jersey.png",
"Lat":40.668714,
"Lon":-74.114309
},
{
### Keybase proof
I hereby claim:
* I am gavinr on github.
* I am gavinr (https://keybase.io/gavinr) on keybase.
* I have a public key whose fingerprint is EB22 A70F EE67 C3CE 51BB 5297 740D 13AE A56A 911B
To claim this, I am signing this object:
@gavinr
gavinr / atom-io-js-packages.md
Last active August 29, 2015 14:17
Atom.io JS Packages
@gavinr
gavinr / filterGrid.js
Created April 7, 2015 02:22
Function to filter a dgrid/dstore
var filterGrid = function(grid, memory, searchTerm) {
var setToMemory;
// if the search is empty, "turn off" filter
if (searchTerm === "") {
setToMemory = this.memory;
} else {
var mainFilter;
// go though each column, applying the filter for each:
for (var key in grid.columns) {
if (grid.columns.hasOwnProperty(key)) {
@gavinr
gavinr / dojoOnKeyUp.js
Created April 7, 2015 03:11
wiring up the keyUp event on a textBox to call a function
on(this.filterTextBox, "keyUp", lang.hitch(this, function(name, oldValue, newValue) {
var searchValue = this.filterTextBox.get("value");
this.filterGrid(this.grid, this.memory, searchValue);
}));
[{
"YEAR": "1945",
"COWCODE": 2,
"ARDACODE": 234,
"COUNTRY": "United States of America",
"PRIMARY": "",
"PRIMARY_PERCENTAGE": "",
"CHRSGEN": 110265118,
"JUDGEN": 4641182,
"ISLMGEN": 0,
[
{
"YEAR": "1945",
"COWCODE": 2,
"ARDACODE": 234,
"COUNTRY": "United States of America",
"PRIMARY": "CHRSGEN",
"PRIMARY_PERCENTAGE": 0.7880132496712595,
"CHRSGEN": 110265118,
"JUDGEN": 4641182,