Skip to content

Instantly share code, notes, and snippets.

View bretton's full-sized avatar

bretton bretton

  • Cape Town, South Africa
View GitHub Profile
bretton / blockstack
Created November 9, 2017 19:03
Verifying my Blockstack ID is secured with the address 1Np8AKYGHN6S4mUYVyDpMZ7xVU185W8veM
bretton /
Last active November 15, 2019 19:35
updated & improved guide to installing LND, BTCD, 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 btcd, lnd, on testnet, running on an ubuntu 16.04 server host.

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

Original installation guide is here:

bretton /
Last active January 24, 2018 21:33
monitor lnd wallet and channel balances

Short script to monitor walletbalance and channelbalance for LND, and log to csv file for later graphing. You need a working LND, and jq installed.

first setup by editing balances.txt and add a header line


add the following script, edit

bretton /
Last active January 25, 2022 14:07
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:

bretton /
Last active July 7, 2021 01:00
Random stuff for testing with Lightning, QRCodes

Random stuff on using QRCodes for testing Lightning between Mac, Linux and Android

generate a QR code on the command line for LND

sudo apt-get install qrencode
lncli newaddress np2wkh |jq -c -r .address |qrencode -t ASCII -m 5

MacOS: copy-paste an address or lightning payment request from command line into QREncoder and then scan with Eclair

bretton /
Last active December 29, 2023 02:59
Visualisers of the Lightning Network (and some other explorers)

A (mostly) visual collection of the Lightning Network


Network views tend to be the view of the network from a single node, or small selection of nodes. They are not complete views of the network. This is impossible to achieve. Even if many node views were combined, it would still be incomplete.

These network views, or network maps, have been termed 'visualisers' by the LN community.

Screenshots may reflect older visual styles, and are dated accordingly.

bretton /
Last active April 14, 2023 22:56
List of Testnet Stores for Lightning

A list of testnet stores for Lightning

(Incorporating sites listed by @moli at with additions)

  • Updated 2018-08-22 to remove dead pages, add updated links.
  • Updated 2018-09-14 to remove dead pages.
  • Updated 2023-04-15 to remove dead links.


bretton /
Last active July 5, 2023 01:16 — forked from tyzbit/
The Lightning Network (Testnet)

Forked from vasturiano, with dataset and minor other changes.

Forked from tyzbit, with new dataset from four hosts, initial jq combine command added


The Lightning Network as seen from my three nodes, with tyzbit node, at about 22:00 UTC on Feb 20 2018. This data is updated manually when I feel like it.


bretton /
Last active April 24, 2023 10:59
Scenario Planning for a Lightning Provider

WIP 2018-02-08, comments updated 2022-04-24

Scenario Planning for a Lightning Provider

This gist is an outline of a likely scenario within South Africa, a developing country with a strong interest in Bitcoin & blockchain technologies.

Although it is expected within the LN community that users & merchants will run their own nodes, and fund their own channels, this approach seems to require a level of familiarity with the concepts and technology beyond the comprehension of the average joe, along with a level of access to bitcoin for channel funding purposes that is outside the financial reach of most in this country.

It's far more likely that mainstream adoption will come via parallels to existing widespread usage models, such as:

  • buying and loading prepaid airtime, via cash & EFT
bretton /
Created March 5, 2018 14:17 — forked from ooZberg/
I use this script to backup my QEMU/KVM/libVirt virtual machines. The script requires KVM 2.1+ since it uses the live blockcommit mode. This means the data in the snapshot disk is rolled back into the original instead of the other way around. Script does NOT handle spaces in paths.
if [ -z "$BACKUPDEST" -o -z "$DOMAIN" ]; then
echo "Usage: ./vm-backup <backup-folder> <domain> [max-backups]"
exit 1