$ node net.js
writing pub
received pub: 026c975cf8cffd1fe2109aa042e2800eb8358864bb7b4961386cb95f3d98355d97 (33)
writing greeting
received res
connected
SingleFundingResponse {
channelID: 0,
channelDerivationPoint: ,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" | |
" ~/.vimrc | |
" | |
set nocompatible | |
set hidden | |
set ruler | |
set visualbell | |
set noerrorbells | |
set nostartofline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/* eslint no-control-regex: "off" */ | |
'use strict'; | |
const assert = require('assert'); | |
const Path = require('path'); | |
const { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const path = require('path'); | |
const fs = require('./lib/utils/fs'); | |
async function findFiles(dir, match, ignore, files) { | |
const list = await fs.readdir(dir); | |
for (const name of list) { | |
if (ignore.has(name)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// Sweep bcc from trezor multisig. | |
const assert = require('assert'); | |
const util = require('util'); | |
const trezor = require('trezor.js-node'); | |
const HDPublicKey = require('bcoin/lib/hd/public'); | |
const HARDENED = 0x80000000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"hash": "0000000000000000018c59d807bff651ead9f8fd6eef075ee5cffcf98bf4674c", | |
"height": 464208, | |
"size": 998109, | |
"txs": 684, | |
"inputs": 6162, | |
"outputs": 1362, | |
"inputCost": 5578086, | |
"outputCost": 271012, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function serializeList(items) { | |
var size = 0; | |
var i, p, data; | |
for (i = 0; i < items.length; i++) | |
size += 4 + items[i].length; | |
data = new Buffer(size); | |
p = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Track fedex/ups/usps/iparcel/upsmi packages. | |
track-package() { | |
local open track fedex ups usps len url i \ | |
urls upsmi iparcel iparcel_ usps_ dhl ontrac | |
if test -z "$1"; then | |
return 1 | |
fi | |
if test "$1" = 'open'; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* scrypt | |
* Copyright (c) 2016, Christopher Jeffrey (MIT License). | |
* | |
* Ported from: | |
* https://github.com/Tarsnap/scrypt/blob/master/lib/crypto/crypto_scrypt-ref.c | |
* | |
* Copyright 2009 Colin Percival | |
* All rights reserved. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fast inverse square root in javascript | |
// https://en.wikipedia.org/wiki/Fast_inverse_square_root#Overview_of_the_code | |
// Example: | |
// > 1 / Math.sqrt(0.15625) | |
// 2.5298221281347035 | |
// > Math.pow(0.15625, -0.5) | |
// 2.5298221281347035 | |
// > Q_rsqrt(0.15625) | |
// 2.5254863388218056 |