I hereby claim:
- I am jonathanbp on github.
- I am jonathanbp (https://keybase.io/jonathanbp) on keybase.
- I have a public key whose fingerprint is 2614 FF4E 6A52 A0F9 1F86 0E97 15E3 81E3 F5B2 BFAE
To claim this, I am signing this object:
#!/usr/bin/env bash | |
# This script will try to detect relations between collections in a mongodb database. | |
function spinner() { | |
local info="$1" | |
local pid=$! | |
local delay=0.75 | |
local spinstr='|/-\' | |
while kill -0 $pid 2>/dev/null; do |
curl http://regionsyd.sirenia.io:8081/debug/vars | jq '.PerSubscriberStreams | to_entries | sort_by(.value) | reverse | .[] | "\(.key),\(.value)"' -r | csvlook -H | less |
-- Create a table with a JSONB column. | |
CREATE TABLE items ( | |
id SERIAL PRIMARY KEY, | |
attrs JSONB | |
); | |
-- You can insert any well-formed json input into the column. Note that only | |
-- lowercase `true` and `false` spellings are accepted. | |
INSERT INTO items (attrs) VALUES ('{ | |
"name": "Pasta", |
// Ad-hoc minions | |
var controlConn = new WebSocket('wss://emet.cc.au.dk/golem/v1/connect/'+webstrate.webstrateId); | |
controlConn.addEventListener("open", function(msg) { | |
console.log("connection to chief-minion established"); | |
}); | |
controlConn.addEventListener("message", function(msg) { | |
console.log("got message on controlConn", msg); | |
var minionMsg = JSON.parse(msg.data); | |
if (minionMsg.Event === "minion-connected" && minionMsg.Type === "minion-debug") { | |
// establish a connection to the minion |
// Paths | |
var paths = { | |
sources: "./src/**/*.js", | |
sourceMain: "./src/index.js", | |
tests: "./test/*.js", | |
styles: "./styles", | |
target: "./dist", | |
targetMain: "bundle.js", | |
targetMainMin: "bundle.min.js" | |
} |
I hereby claim:
To claim this, I am signing this object:
(function () { | |
d3.analog= function() { | |
var height = 100, gap=10, | |
xValue = function(d) { return d[0]; }, | |
xScale = null, | |
color = d3.scale.category10(); | |
function chart(selection) { | |
selection.each(function(d) { | |
var g = d3.select(this); |
This simple bar chart is constructed from a TSV file storing the frequency of letters in the English language. The chart employs conventional margins and a number of D3 features:
curl "$1/$3?depth=0" | xmllint --format - | grep Id | sed 's/<Id>\(.*\)<\/Id>/\1/' | sort | uniq | tr -s ' ' | sed 's/^ *//g' | while read img_id ; do | |
curl "$1/$3/$img_id" | xmllint --format - | egrep -v "(Lamport|LastModified)" > tmpimg.xml | |
curl -X PUT -d @tmpimg.xml "$2/$3/$img_id" | |
done |