Skip to content

Instantly share code, notes, and snippets.

View gavinr's full-sized avatar

Gavin Rehkemper gavinr

View GitHub Profile
@gavinr
gavinr / define-example.js
Created September 5, 2015 16:28
for gavinr.com
define([
'd3/d3';
],
function(d3)
@gavinr
gavinr / d3-require.js
Last active September 5, 2015 16:31
for gavinr.com
require({paths: {d3: 'http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6'}});
@gavinr
gavinr / dbindSupport.js
Last active August 29, 2015 14:27
dbindSupport
define([
"https://rawgit.com/kriszyp/dbind/master/bind.js",
"esri/core/Accessor",
"esri/core/declare",
"esri/core/accessorSupport/introspect",
"esri/core/accessorSupport/Property"
], function(
bind,
We can't make this file beautiful and searchable because it's too large.
name,recclass,mass (g),year,reclat,reclong
Aachen,L5,21,01/01/1880 12:00:00 AM,50.775,6.08333
Aarhus,H6,720,1/1/1951 0:00,56.18333,10.23333
Abee,EH4,107000,1/1/1952 0:00,54.21667,-113
Acapulco,Acapulcoite,1914,1/1/1976 0:00,16.88333,-99.9
Achiras,L6,780,1/1/1902 0:00,-33.16667,-64.95
Adhi Kot,EH4,4239,1/1/1919 0:00,32.1,71.8
Adzhi-Bogdo (stone),LL3-6,910,1/1/1949 0:00,44.83333,95.16667
Agen,H5,30000,01/01/1814 12:00:00 AM,44.21667,0.61667
Aguada,L6,1620,1/1/1930 0:00,-31.6,-65.23333
We can't make this file beautiful and searchable because it's too large.
name,nametype,recclass,mass (g),fall,year,id,reclat,reclong,GeoLocation
Aachen,Valid,L5,21,Fell,01/01/1880 12:00:00 AM,1,50.775000,6.083330,"(50.775000, 6.083330)"
Aarhus,Valid,H6,720,Fell,01/01/1951 12:00:00 AM,2,56.183330,10.233330,"(56.183330, 10.233330)"
Abee,Valid,EH4,107000,Fell,01/01/1952 12:00:00 AM,6,54.216670,-113.000000,"(54.216670, -113.000000)"
Acapulco,Valid,Acapulcoite,1914,Fell,01/01/1976 12:00:00 AM,10,16.883330,-99.900000,"(16.883330, -99.900000)"
Achiras,Valid,L6,780,Fell,01/01/1902 12:00:00 AM,370,-33.166670,-64.950000,"(-33.166670, -64.950000)"
Adhi Kot,Valid,EH4,4239,Fell,01/01/1919 12:00:00 AM,379,32.100000,71.800000,"(32.100000, 71.800000)"
Adzhi-Bogdo (stone),Valid,LL3-6,910,Fell,01/01/1949 12:00:00 AM,390,44.833330,95.166670,"(44.833330, 95.166670)"
Agen,Valid,H5,30000,Fell,01/01/1814 12:00:00 AM,392,44.216670,0.616670,"(44.216670, 0.616670)"
Aguada,Valid,L6,1620,Fell,01/01/1930 12:00:00 AM,398,-31.600000,-65.233330,"(-31.600000, -65.233330)"
[
{
"YEAR": "1945",
"COWCODE": 2,
"ARDACODE": 234,
"COUNTRY": "United States of America",
"PRIMARY": "CHRSGEN",
"PRIMARY_PERCENTAGE": 0.7880132496712595,
"CHRSGEN": 110265118,
"JUDGEN": 4641182,
[{
"YEAR": "1945",
"COWCODE": 2,
"ARDACODE": 234,
"COUNTRY": "United States of America",
"PRIMARY": "",
"PRIMARY_PERCENTAGE": "",
"CHRSGEN": 110265118,
"JUDGEN": 4641182,
"ISLMGEN": 0,
@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);
}));
@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 / atom-io-js-packages.md
Last active August 29, 2015 14:17
Atom.io JS Packages