Skip to content

Instantly share code, notes, and snippets.

Christopher Jeffrey (JJ) chjj

Block or report user

Report or block chjj

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
chjj /
Created Nov 6, 2011
setting transparency from bash
# transset in a bash script
# copyright (c) 2011, christopher jeffrey
# usage:
# by window id
#trans -w "$WINDOWID" -o 75
# by name
#trans -n "urxvt" -o 75
chjj / .vimrc
Created Feb 12, 2019
mini vimrc
View .vimrc
" ~/.vimrc
set nocompatible
set hidden
set ruler
set visualbell
set noerrorbells
set nostartofline
View satoshi-sig-generator.js
'use strict';
// original:
const BN = require('bn.js');
const elliptic = require('elliptic');
const bcoin = require('bcoin');
const ecdsa = new'secp256k1');
View bmocha.js
#!/usr/bin/env node
/* eslint no-control-regex: "off" */
'use strict';
const assert = require('assert');
const Path = require('path');
const {
View rewrite.js
'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))
chjj / sweep-bcc.js
Created Aug 8, 2017
Sweep BCC from trezor multisig
View sweep-bcc.js
'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;
View 1000-cost.json
"hash": "0000000000000000018c59d807bff651ead9f8fd6eef075ee5cffcf98bf4674c",
"height": 464208,
"size": 998109,
"txs": 684,
"inputs": 6162,
"outputs": 1362,
"inputCost": 5578086,
"outputCost": 271012,
View libsecp256k1.wast
This file has been truncated, but you can view the full file.
(type $0 (func (param i32 i32)))
(type $1 (func (param i32 i32 i32 i32 i32 i32) (result i32)))
(type $2 (func (param i32)))
(type $3 (func (result i32)))
(type $4 (func (param i32 i32 i32 i32) (result i32)))
(type $5 (func (param i32 i32 i32) (result i32)))
(type $6 (func))
(type $7 (func (param i32) (result i32)))
$ node net.js
writing pub
received pub: 026c975cf8cffd1fe2109aa042e2800eb8358864bb7b4961386cb95f3d98355d97 (33)
writing greeting
received res
SingleFundingResponse {
  channelID: 0,
  channelDerivationPoint: <Buffer 02 cd c3 b5 2f 70 a6 4c eb d5 e4 0e 17 ab 8f 2b d8 c4 fe 47 bf d6 35 5b be df 3e dd 76 87 f0 fa eb>,
View ser-list.js
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;
You can’t perform that action at this time.