Skip to content

Instantly share code, notes, and snippets.

View nicola's full-sized avatar

Nicola nicola

View GitHub Profile
@nicola
nicola / README.md
Last active August 29, 2015 14:10
Visualizing Tube closures

Showing how you can visualize tube closures with TubeMaps

@nicola
nicola / README.md
Last active April 30, 2023 13:50
London Tube Map with Voronoi
@nicola
nicola / README.md
Last active August 29, 2015 14:10
London TubeMap with Voronoi showing closures and Cycle Hire bikes
@nicola
nicola / README.md
Last active August 29, 2015 14:10
Visualizing Cycle Hire anomalies during London tube closure (with Voronoi)
@nicola
nicola / README.md
Last active August 29, 2015 14:10
Visualizing a route on London Tube

Visualization

@nicola
nicola / gist:07afb390a6c510ea7b6f
Last active June 17, 2017 06:53
Regexp to transform Facebook messages from the archive into JSON
cat messages.htm \
| iconv -f utf8 -t ascii//TRANSLIT//IGNORE \
| sed "s/['\`]//g" \
| tr '\n' ' ' \
| sed 's/<div class="thread">\([a-zA-Z0-9,\.\ &#;-]*\)\(<div class="message">\)/\
{ thread: @ESCAPE0x1@\1@ESCAPE0x1@, messages:[\2/g' \
| sed 's/<div class="message"><div class="message_header"><span class="user">\([a-zA-Z0-9,\.\ &#;-]*\)<\/span>/, {from:@ESCAPE0x1@\1@ESCAPE0x1@,/g' \
| sed 's/<span class="meta">\([a-zA-Z0-9\ ,:+-]*\)<\/span><\/div><\/div>/ date:@ESCAPE0x1@\1@ESCAPE0x1@,/g' \
| sed 's/<p>/message:@ESCAPE0x1@/g' \
| sed 's/<\/p>/@ESCAPE0x1@}/g' \
@nicola
nicola / keybase.md
Created February 24, 2015 22:45
keybase.md

Keybase proof

I hereby claim:

  • I am nicola on github.
  • I am nicolagreco (https://keybase.io/nicolagreco) on keybase.
  • I have a public key whose fingerprint is 4BE2 A94A C6B3 51B4 2D36 F3F1 FFB3 E1D8 A842 4F55

To claim this, I am signing this object:

@nicola
nicola / index.js
Last active August 29, 2015 14:26
Melvin's rewriting into an npm module
var fs = require("fs");
var forge = require('node-forge');
var debug = require('debug')('converter');
var BigInteger = forge.jsbn.BigInteger;
/*
* Convert
*
* @param {String} login
* @param {String} public
// v1
const GossipSwarm = require('gossip-swarm')
const CyclonProtocol = require('gossip-cyclon')
const swarm = GossipSwarm({
shuffle: CyclonProtocol
})
swarm.shuffle()
Verifying my Blockstack ID is secured with the address 1BsBtACmEk1mbx2Ngpqudo4wraZ87WiU9W https://explorer.blockstack.org/address/1BsBtACmEk1mbx2Ngpqudo4wraZ87WiU9W