Skip to content

Instantly share code, notes, and snippets.


David C kccheung

View GitHub Profile
fjahr /
Last active Jun 20, 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

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 Apr 13, 2019
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

feroda /
Created Feb 11, 2018
Django reverse proxy for Grafana SSO
## Install the Django reverse proxy package: `pip install django-revproxy`
## Enable auth.proxy authentication in Grafana like the following
enabled = true
header_name = X-WEBAUTH-USER
header_property = username
You can’t perform that action at this time.