Skip to content

Instantly share code, notes, and snippets.

David Cheung kccheung

Block or report user

Report or block kccheung

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
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
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
ottosch /
Last active Nov 14, 2018
A script to help using ymgve's bitcoin_fork_claimer script
#!/usr/bin/env python
# This script is meant to be used with bitcoin_fork_claimer:
# The outputs of this script are the inputs to that script.
# Python 2.x is required
import urllib2
import json
import sys
import collections
bretton /
Last active Feb 26, 2019
updated & improved guide to installing LND, Bitcoind, on Ubuntu 16.04 Server on testnet

2018-03-18: Updating of this guide is taking a backseat to the mainnet version at


This guide is specific to getting LND and bitcoind running on ubuntu 16.04 LTS for testnet.

It does not address mainnet, or using btcd, or neutrino.

Original installation guide:

tanaikech /
Last active May 3, 2019
Bitfinex API for Google Apps Script

Bitfinex API for Google Apps Script

This sample script is converted this sample script (javascript) to Google Apps Script. The point for converting is signature as shown in the following sample script.

  • At Bitfinex API, after "/api/" + apiPath + nonce + rawBody is encrypted using HMAC SHA-384, the data of byte array is converted to HEX.
    • In Google Apps Script, there is no the method for this.
    • The data which was encrypted by Utilities.computeHmacSignature() is the bytes array of the signed hexadecimal.
    • On the other hand, at this sample script for javascript, the data which was encrypted by crypto.createHmac('sha384', apiSecret).update(signature).digest('hex') is the string of the unsigned hexadecimal.

In order to achieve above, I made the method of bytesToHex().

f0k /
Created Dec 6, 2017
Set Nvidia GPU application clocks and power limits to maximum supported values
# Sets each CUDA device to persistence mode and sets the application clock
# and power limit to the device's maximum supported values.
# When run with "--dry-run" as first command line argument or not as superuser,
# will display the commands, otherwise it will execute them.
# Hint: To run this at boot time, place this script in /root and create a file
# /etc/cron.d/nvidia_boost with the following single line:
# @reboot root /root/ >/dev/null
YoRyan /
Last active Jul 22, 2019
Cross-platform controller for NiceHash Excavator for Nvidia (aka, NiceHash 2 for Linux). This is no longer maintained, please see
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Cross-platform controller for NiceHash Excavator for Nvidia."""
# Example usage:
# $ excavator -p 3456 &
# $ python3
# History:
You can’t perform that action at this time.