November 17, 2016
Michelle Ho, [email protected]
Mehak Sachdeva, [email protected], @MehakSachdeva_
This link is here: http://bit.ly/1117-yale
November 17, 2016
Michelle Ho, [email protected]
Mehak Sachdeva, [email protected], @MehakSachdeva_
This link is here: http://bit.ly/1117-yale
Extends Dynamic Classification of CartoDB Choropleth Map to include a legend. Makes use of a custom legend example and the cdb.geo.ui.Legend.Custom()
method. Default CartoDB.css round bullets are overwritten to produce rectangles.
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
// Handy plv8 console object (debugging) | |
var console = (function(){ | |
var columns = 100; | |
function logString(level, str) { | |
var chunk = str.substring(0, columns); | |
var overflow = str.substring(columns); | |
plv8.elog(level, chunk); | |
if (overflow.length) logString(level, " | "+overflow); | |
}; |
CREATE OR REPLACE FUNCTION plv8x.json_eval(code text) RETURNS plv8x.json AS $$ | |
return JSON.stringify( | |
eval("(function(){return #code})").apply(this) | |
); | |
$$ LANGUAGE plls IMMUTABLE STRICT; | |
CREATE OR REPLACE FUNCTION plv8x.json_eval(data plv8x.json, code text) RETURNS plv8x.json AS $$ | |
return JSON.stringify( | |
eval("(function(){return #code})").apply(JSON.parse(data)) | |
); | |
$$ LANGUAGE plls IMMUTABLE STRICT; |
/* public.plv8_startup() | |
* | |
* Allow to have multiple per-schema plv8_init functions. | |
* | |
* USAGE: | |
* | |
* 1. Add the following line to the end of your postgresql.conf file: | |
* | |
* plv8.start_proc = 'public.plv8_startup' | |
* |
#! /bin/bash | |
sudo apt-get install npm | |
cd /var/django | |
npm install moment moment-timezone | |
sudo -u postgres psql -d template1 -c "create extension plv8;" | |
sudo -u postgres psql -d template1 << EOF |
Listen / Notify for automatic object updates - pattern in postgreSQL Presented at the San Francsico PostgreSQL User Group Meetup 8/17/15
by Eric Eslinger [email protected] github.com/ericeslinger
This example uses listen/notify calls in PostgreSQL that trigger on row update to pass events from the database to a listening node.js web application that in turn uses socket.io to pass events