Skip to content

Instantly share code, notes, and snippets.

@karzak
karzak / nacl-test.js
Last active December 7, 2018 21:27
Benchmark sodium and tweetnacl
const assert = require('assert');
const Benchmark = require('benchmark');
const tweetnacl = require('tweetnacl');
const tweetnaclfast = require('tweetnacl/nacl-fast');
const sodium = require('sodium');
const uSodium = require('sodium-universal')
const jSodium = require('sodium-javascript')
const base64_to_Uint8Array = function(input) {
@karzak
karzak / multiple-connectors.js
Last active November 30, 2018 18:59
Multiple Connector Bug
const Connector = require('ilp-connector')
const getPort = require('get-port')
const fetch = require('node-fetch')
const faucetUrl = 'https://faucet.altnet.rippletest.net/accounts'
const xrpServer = 'wss://s.altnet.rippletest.net:51233'
async function run () {
async function getXrpAccount () {
const res = await fetch(faucetUrl, {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
500 g rutabega
200 g yukon potatoes
~2c bolete broth
15g nutritional yeast
1.5tsp mustard powder
1 tbsp mustard
-dissolve in water
@karzak
karzak / cases.csv
Created July 31, 2016 15:43
Choropleth of Reported Cases of Zika Virus
country report_date unit value
Panama 2016-07-06 cases 292.0
Argentina 2016-06-26 cases 1674.0
Honduras 2016-06-14 cases 21492.0
Colombia 2016-07-16 cases 99474.0
Virgin Islands 2016-07-26 cases 436.0
Brazil 2016-06-11 cases 165932.0
Dominican Rep. 2016-06-25 cases 219.0
Guatemala 2016-07-16 cases 4397.0
Puerto Rico 2016-07-21 cases 5582.0
@karzak
karzak / am.json
Created July 31, 2016 15:26
am.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!DOCTYPE html>
<meta charset="utf-8">
<style> /* set the CSS */
body { font: 12px Arial;}
path {
stroke: steelblue;
stroke-width: 2;
fill: none;