Skip to content

Instantly share code, notes, and snippets.


David C kccheung

View GitHub Profile
fjahr /
Last active Aug 28, 2020
Debugging Bitcoin Core

Moved to to allow for better collaboration.

This document is currently optimized for MacOS. If you would like to help me add Linux equivalent commands, please let me know.

Debugging Bitcoin Core

This guide is designed to give beginners of C++ development and/or people new to the bitcoin core code base an overview of the tools available for debugging issues as well as giving hints where issues may trip you up.

import hashlib
import hmac
import json
import time
import urllib.parse
from threading import Thread
from collections import deque
from requests import Request, Session
from requests.exceptions import HTTPError
import numpy as np
# expects a numpy array with trades
# each trade is composed of: [time, price, quantity]
def generate_volumebars(trades, frequency=10):
times = trades[:,0]
prices = trades[:,1]
volumes = trades[:,2]
ans = np.zeros(shape=(len(prices), 6))
candle_counter = 0
vindard /
Last active Sep 17, 2020
A script built off of @alexbosworth's backup script that monitors lnd's `channel.backup` file for changes and uploads those changes to Dropbox when detected.

Lnd Automated Channel Backup Guide

This script was inspired by @alexbosworth's channel.backup backup script and my own .lnd folder backup script. It monitors lnd's channel.backup file for changes and uploads those changes to Dropbox when detected.

Setup Script

To get started, download the script:

$ cd && wget -qN
$ sudo chmod +x

Install make

You will probably need build essential tools

# Ubuntu install build tools:
sudo apt-get install -y build-essential

Install Node.js

bretton /
Last active May 24, 2019
LND Backup, Restore, Migrate

Scriptless Script for DLC

Scriptless Script


<witness version 0x0X> <public key / EC point : P >


Setup Bitcoin.conf

bitcoin.conf flags for LND integration

rpcpassword= // make a strong password
kccheung /
Created Apr 30, 2018 — forked from n8henrie/
Python script template
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
A simple python script template.
import argparse
ecurrencyhodler / LTC-Lightning-Network-lnd-Guide (Mac).md
Last active Oct 26, 2020
This is a step-by-step main net tutorial on how to setup a lightning network node for Litecoin on a Mac. It will take you from the beginning all the way through to becoming visible on a ln explorer. To send or recieve payments, refer to "Basic lnd Commands."
View LTC-Lightning-Network-lnd-Guide (Mac).md


This is a step-by-step main net tutorial on how to setup a Lightning Network node for Litecoin on a Mac. It is specifically for the lnd client by the Lightning Labs. You can copy and paste most of the commands except for the times I've indicated in bold for you to input your own information. It would also be a good idea to backup your computer prior to starting just in case you need to start over.

Below is a legend. Refer to it as you come across terms or symbols you don’t understand. The first part of the tutorial is taken from the lnd github. However, everything else is written with the help of Patrick Walters taking me step by step through the process.


$ = This symbol means 1 line of code. Do not type “$” into your terminal. Simply input what follows then push enter.

Pubkey = Short for the public key that is generated from the private key w

You can’t perform that action at this time.