Skip to content

Instantly share code, notes, and snippets.

Nicola nicola

Block or report user

Report or block nicola

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View i94-count-days-in-usa.js
// This script counts how many days you have been in the USA
// This is a personal script, use it at your own risk
// This is not an official tool and it can do wrong calculations
// which might result in loss in visa status, green card, citizenship
// and whatever you can think of
// This extracts data from the i94 website from the history result view
function daysInYear(year) {
var recs = angular.element(".history-results").scope().vm.recs
View gist:4c75627ed81598503c1822552508396f
Verifying my Blockstack ID is secured with the address 1BsBtACmEk1mbx2Ngpqudo4wraZ87WiU9W
View cyclon.js
// v1
const GossipSwarm = require('gossip-swarm')
const CyclonProtocol = require('gossip-cyclon')
const swarm = GossipSwarm({
shuffle: CyclonProtocol
nicola / index.js
Last active Aug 29, 2015
Melvin's rewriting into an npm module
View index.js
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

Keybase proof

I hereby claim:

  • I am nicola on github.
  • I am 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 / gist:07afb390a6c510ea7b6f
Last active Jun 17, 2017
Regexp to transform Facebook messages from the archive into JSON
View gist:07afb390a6c510ea7b6f
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 /
Last active Aug 29, 2015
Visualizing a route on London Tube


nicola /
Last active Aug 29, 2015
Visualizing Cycle Hire anomalies during London tube closure (with Voronoi)
nicola /
Last active Aug 29, 2015
London TubeMap with Voronoi showing closures and Cycle Hire bikes
nicola /
Last active May 15, 2017
London Tube Map with Voronoi
You can’t perform that action at this time.