Skip to content

Instantly share code, notes, and snippets.

View dbouwman's full-sized avatar
😎
Hubbin it up @ Esri

Dave Bouwman dbouwman

😎
Hubbin it up @ Esri
View GitHub Profile
@dbouwman
dbouwman / webmap.json
Created August 27, 2015 21:31
Drought Outlook
{
"item": {
"title": "New Map",
"snippet": "Drought Outlook",
"extent": [
[
-110.79999999997013,
-68.88163488885452
],
[
@dbouwman
dbouwman / webmap.json
Created August 27, 2015 21:31
Drought Outlook
{
"item": {
"title": "New Map",
"snippet": "Drought Outlook",
"extent": [
[
-181.1116496836007,
-18.35790289352071
],
[
@dbouwman
dbouwman / index.html
Last active August 27, 2015 21:34
Drought_Exposure_Area_District
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href=
"http://js.arcgis.com/3.14/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href=
"https://rawgit.com/benheb/legend/master/legend.css">
@dbouwman
dbouwman / map-control-view.js
Created February 7, 2014 03:57
Map Controls view with calls to log the event
Composer.module('MapBarModule.Controls', function (Controls, App, Backbone, Marionette, $, _) {
//Controls item view
Controls.View = Backbone.Marionette.ItemView.extend({
model: Controls.Model,
template: 'mapbar/controls/controls_view',
className: 'mapbar-controls',
events: {
"click .type": "_changeBasemap"
},
@dbouwman
dbouwman / took.js
Created February 7, 2014 04:09
Took.js performance timer
/**
* Took.js
* Simple Timer object that can persist itself to
* Google Analytics, custom logging backend
* or just the console.
* Depends on jQuery
* @param {object} options Options hash
*/
var Took = function(options){
//
@dbouwman
dbouwman / model-fetch.js
Created February 7, 2014 04:15
Snipped of a model where we add timing code around an xhr
...
fetch: function(){
var url = this.get('url');
var self = this;
//start the timer
App.startTimer('dataset-fetch', 'ajax', 'Dataset: ' + this.get('id'));
//closure for the callback
var doneCB= function(data){
self.loadFromJson(data);
//stop the timer
@dbouwman
dbouwman / Coverage.txt
Last active August 29, 2015 13:57
Code Coverage Report
Running "jshint:files" (jshint) task
>> 190 files lint free.
Running "jasmine:alltests" (jasmine) task
Testing jasmine specs via phantom
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
[2014-03-27 14:50:08 -0600] Parameters: {"title"=>"Fort Collins Open Data", "subdomain"=>"ftc", "external_url"=>"ftc.dev", "public"=>true, "group_ids"=>["81c5fe2b6410459dad76b0476ab3124a", "743a134d094a4cebb7ac11de4b360875", "e924622f3f924405aa8eac76248fc53d", "8a87b8ae55494de08cda88ffcd7490eb", "c84f48cecf924abdb25ee39247bbe673", "fa3fd4d54c794f188f921f3aa6336ce9", "fc8fda59e5ec4eca996412f25f50185a", "45fd7cd699114b09865d06b4159c4547"], "header_objects"=>"[{\"header_text\":\"Fort Collins Open Data\",\"header_image_url\":\"http://placehold.it/150x24\"}]", "footer_html"=>"\n <div class=\"row\">\n \n <div class=\"column-8\">\n <h3 id=\"connect\">Connect</h3>\n<ul>\n<li><a href=\"http://www.fcgov.com/gis/\">Fort Collins GIS</a></li>\n<li><a href=\"http://www.larimer.org/maps/\">Larimer County</a></li>\n</ul>\n\n\n </div>\n \n <div class=\"column-16 last\">\n <h3 id=\"developers\">Developers</h3>\n<ul>\n<li><a href=\"http://www.fcgov.com/gis/\">Fort Collins GIS</a></li>\n<li>
@dbouwman
dbouwman / Controller.spec.js
Last active August 29, 2015 13:57
Controller Spec Example
describe('Dataset Show Controller', function () {
describe('fresh load', function () {
var noOp = function(){};
beforeEach(function() {
//get dataset from json
json = getJSONFixture('modules/datasets/show/inlined-dataset.json');
//setup the app options
var appOptions = {
baseUrl: 'http://localhost:3000',
environment: 'unit-test',
@dbouwman
dbouwman / gist:10745170
Created April 15, 2014 16:21
Yeoman Scaffolding for Fun and Profit
Writing web apps from scratch is so 20013! Unable to ween the industry off their "need-this-yesterday" mentality, today's web developers need to seek productivity wherever they can find it, and the yeoman + grunt + bower triumvirate are here to help!
In this talk I will review a scaffolder that generates a solid project foundation for responsive web map applications. It builds out:
- Leaflet + mapController to provide geo-services
- Twitter Bootstrap
- Backbone + Marionette for application structure
- jshint for all your linting needs
- Jasmine for unit testing
- istanbul for code-coverage