Skip to content

Instantly share code, notes, and snippets.

# A bitcoind fronted by a btc-rpc-proxy so we can prune it.
FROM ubuntu:20.04
RUN apt-get update -q \
&& apt-get install -y -qq --no-install-recommends \
ca-certificates \
dirmngr \
wget \
curl \
build-essential
FROM ubuntu:20.04
RUN apt-get update -q \
&& apt-get install -y -qq --no-install-recommends \
ca-certificates \
dirmngr \
wget \
curl \
build-essential
ARG BITCOIN_VERSION=0.20.1
@cdecker
cdecker / Dockerfile.travis
Created October 17, 2020 13:06
Dockerfile emulating travis-ci
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y libsqlite3-dev cppcheck valgrind gcc-4.8 gettext libc6-dev-armhf-cross libc6-dev-arm64-cross gcc-aarch64-linux-gnu gcc-arm-linux-gnueabihf qemu-user-static binfmt-support libsecp256k1-dev libpq-dev postgresql git
ENV TIMEOUT=180
ENV export PYTEST_PAR=2
ENV ARCH=64
ENV TEST_CMD="make"
ENV TRAVIS_COMPILER=gcc
ENV CC=${CC:-gcc}
ENV CC_FOR_BUILD=${CC_FOR_BUILD:-gcc}
2018-02-16T05:21:59.066Z lightningd(25245): 02c8a3999011efbe323f1bb0af373e7b07b0aa11eff866d48702a0653630cd5311 chan #0: State changed from UNINITIALIZED to OPENINGD
2018-02-16T05:21:59.067Z lightningd(25245): lightning_openingd-02c8a3999011efbe323f1bb0af373e7b07b0aa11eff866d48702a0653630cd5311 chan #0: pid 7795, msgfd 27
2018-02-16T05:21:59.068Z lightningd(25245): wallet_channel_save: UNIQUE constraint failed: peers.node_id
2018-02-16T05:21:59.068Z lightningd(25245): FATAL SIGNAL 6 RECEIVED
2018-02-16T05:21:59.081Z lightningd(25245): backtrace: lightningd/log.c:498 (log_crash) 0x411c09
2018-02-16T05:21:59.081Z lightningd(25245): backtrace: (null):0 ((null)) 0x7efc9a2704af
2018-02-16T05:21:59.081Z lightningd(25245): backtrace: (null):0 ((null)) 0x7efc9a270428
2018-02-16T05:21:59.081Z lightningd(25245): backtrace: (null):0 ((null)) 0x7efc9a272029
2018-02-16T05:21:59.081Z lightningd(25245): backtrace: lightningd/log.c:587 (fatal) 0x412043
2018-02-16T05:21:59.082Z lightningd(25245): backtrace: wallet/db.c:217 (db
from tqdm import tqdm
from itertools import product
import math
NON_SEGWIT_SIZE = 1000000
max_churn = 0
best = (0, 0, 0)
for i, o in tqdm(product(range(1,10000), range(1,10000))):
Python 3.5.2 (default, Nov 17 2016, 17:05:23)
Type "copyright", "credits" or "license" for more information.
IPython 5.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: from test import f, g, s
@cdecker
cdecker / test.log
Created September 23, 2016 11:16
Comparing go and c sphinx implementations
bash +x test.sh
Building in /tmp/tmp.Noh3zIbIj9
Generating go-onion
Node 0 pubkey 02eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f283686619
Node 1 pubkey 0324653eac434488002cc06bbfb7f10fe18991e35f9fe4302dbea6d2353dc0ab1c
Node 2 pubkey 027f31ebc5462c1fdce1b737ecff52d37d75dea43ce11c74d25aa297165faa2007
Node 3 pubkey 032c0b7cf95324a07d05398b240174dc0c2be444d96b159aa6c7f7b1e668680991
Node 4 pubkey 02edabbd16b41c8371b92ef2f04c1185b4f03b6dcd52ba9b78d9d7c89c8f221145
0102eec7245d6b7d2ccb30380bfbe2a3648cd7a942653f5aa340edcea1f2836866195b511c0098cdedb721a2c80dbfc8b13a9679ebdbb4e6b2070f0115e5e0a96713417bdb0cc2d6f253f0fe4850aafa2c68ac7b0f2a47d08f856b4407179723b918b5f5e887ab1f662c2cbd4b7075ac38c26ffaeaa13ccbf3c61a71c415910903fb0a9e3c7bf4695ba61a4add4fc7dd9cc8543e1be58b0478c68672169bda07359a45c5c6c44ebfcd8cc07350fc75e680cc0f8dc12daca52967feb41a729050a076e106348a58cd0d32da9e023e77665a557d63e5f44094d083272c1c09668bfe1fc75e8102479d3d50ed8978570c387e14f01615f10527eadd88b45ffcf2ba029ca52e5bd8a9cce0f01cecdd9d37d144f24e
### Keybase proof
I hereby claim:
* I am cdecker on github.
* I am decker (https://keybase.io/decker) on keybase.
* I have a public key whose fingerprint is B731 AAC5 21B0 1385 9313 F674 A26D 6D9F E088 ED58
To claim this, I am signing this object:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@cdecker
cdecker / README.md
Last active December 14, 2015 03:19 — forked from mbostock/.block

A demo of the d3.geo.tile plugin, which determines which 256x256 tiles are visible in the viewport based on a scale and translate. This demo combines the tile plugin with d3.behavior.zoom for panning and zooming, resulting in a a simple slippy map. Based partly on an example by Tom MacWright.