Skip to content

Instantly share code, notes, and snippets.

? .git
? .gitignore
? 937442-25_maintain_field_schema.patch
? 937442-2_maintain_field_schema.patch
? 937554-1_cleanup_field_data.patch
? sites/default/files
? sites/default/settings.php
Index: modules/field/field.crud.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/field/field.crud.inc,v
@lxbarth
lxbarth / Split cells by custom delimiter
Created November 1, 2010 14:11
Feeds CSV parser splitting cells by a custom delimiter.
<?php
define('MULTI_VALUE_CUSTOM_DELIMITER', '\#');
/**
* Extends FeedsCSVParser to explode row cells by a custom delimiter.
*
* Cells that start with \# will be exploded by the delimiter \#.
*
* So a cell that reads:
a:mapnik ab$ python scons/scons.py configure
scons: Reading SConscript files ...
Welcome to Mapnik...
*********************************************
You are compiling Mapnik trunk (aka Mapnik2)
See important details at:
http://trac.mapnik.org/wiki/Mapnik2
*********************************************
/**
* This is a variation of stateDataMeta, closer to JSON Schema spec and using JSON Ref.
*/
var stateDataMetaRef = {
'type': 'object',
'id': 'stateDataMetaRef',
'properties': {
'stateDataSchema': { // Not sure whether data source is the best name here.
'extends': {'$ref': 'stateDataSchema'},
'required': true
diff --git a/data/data.js b/data/data.js
index ebe5f19..beacbfe 100644
--- a/data/data.js
+++ b/data/data.js
@@ -407,26 +407,32 @@ Dataset.prototype.validate = function(dataVersion, schemaVersion, cb) {
var start = new Date().getTime();
var totalcount = 0;
var errorcount = 0;
- for (row in result) {
- totalcount += 1;
@lxbarth
lxbarth / Query Elastic Search
Created April 11, 2011 22:56
Quick and dirty node script I used for throwing queries and Elastic Search
@lxbarth
lxbarth / gist:1109442
Created July 27, 2011 14:15
Client side routing for Bones
// Add `route()` method for handling normally linked paths into hash paths.
// Because IE7 provides an absolute URL for `attr('href')`, regex out the
// internal path and use it as the fragment. Return false for any paths that
// only contain a hash, IE7 would refresh otherwise.
// NOTE: This file is included explicitly in index.js to ensure it is loaded
// before all other views.
view = Backbone.View;
view.prototype.events = {
'click a.noscroll': 'routeClickNoScroll',
@lxbarth
lxbarth / tilemillchoropleth.md
Created November 16, 2011 16:03
Creating a choropleth map with TileMill, QGIS and SQLite

First: this is awesome work, the below obviously focuses on what's worth improving.

Audience

I wasn't 100 % sure from which angle to judge the paper:

  • What's the intended audience?

Related: maybe this paper should cut faster to the meat and don't spend so much time explaining a methodological framework of analyzing information viz tools? How would this read as a large blog post or CT article? I'm aware that thesis have an expected format. Still, could the paper get faster to its point?