Skip to content

Instantly share code, notes, and snippets.

Avatar

bretton bretton

View GitHub Profile
@bretton
bretton / improved-lnd-bitcoind-mainnet.md
Last active Oct 21, 2020
Detailed guide to installing LND and Bitcoind on Ubuntu 16.04 LTS for Mainnet
View improved-lnd-bitcoind-mainnet.md

Intro

This guide is specific to getting LND 0.5-beta and Bitcoind running on Ubuntu 16.04 LTS for mainnet. It is ageing rapidly and includes steps not necessary on newer versions of LND

Original installation guide:

This guide is broken into the following sections:

  • Install bitcoind and set to start automatically
  • Install development tools and dependancies
@bretton
bretton / lightning-maps.md
Last active Oct 20, 2020
Visualisers of the Lightning Network (and some other explorers)
View lightning-maps.md

A (mostly) visual collection of the Lightning Network

Disclaimer

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
bretton / forex-scrape.md
Last active Oct 7, 2020
Scraping Forex Data
View forex-scrape.md

Scraping Forex Data

I was looking for ways to scrape forex data after fixer.io switched to a subscription model with rate-limiting, making their API useless for lots of queries.

1. Use an alternative API

One alternative API which is still free is https://exchangeratesapi.io/

It's basically a drop-in replacement for fixer.io and can be used to get all forex rates in json format at

@bretton
bretton / changepass.php
Last active Sep 23, 2020
simple php form to change samba password
View changepass.php
<?php
// original script from https://www.cyberciti.biz/tips/change-linux-or-unix-system-password-using-php-script.html
// adapted by Bretton 2020-09-22
//
// Requirements
// 1. webserver with https and php enabled
// 2. make sure you run visudo first and ensure it has
//
// www-data ALL=(ALL) NOPASSWD: /usr/bin/smbpasswd
//
@bretton
bretton / serverless-macos-aws.md
Last active Aug 29, 2020
Setting up serverless on a mac and updating to latest version
View serverless-macos-aws.md

The following is specific to MacOS users, however similar guides may exist for Linux, or this can be adapted accordingly.

How to setup a serverless dev environment on a mac

In order to facilitate easier management of a local copy of a website, private github repository, and S3 bucket with Lambda functions as a website we will make use of the serverless framework.

Install XCode

You may need to check you have the latest XCode dev environment installed. You can install it via the App Store.

@bretton
bretton / bitmex-plotinit-plotly.py
Last active Aug 8, 2020
Bitmex price and volume chart using UDF datasource, with Python and Bokeh for chart
View bitmex-plotinit-plotly.py
#!/usr/bin/python3
# coding=utf-8
#
# Dev Log
# bitmex-plotinit-plotly.py
# =======
# 2020-07-19 - setup script to pull data from Bitmex UDF and create candles and highlights
# - intent is for a base script I can re-run to highlight specific things
# 2020-08-08 - switching to a different chart library
#
@bretton
bretton / how-many-days-over-10k.py
Created Aug 2, 2020
How many days over $10k since CZ tweet to "slap yourself" for selling below that price?
View how-many-days-over-10k.py
#!/usr/bin/python3
# coding=utf-8
#
# Dev Log
# how-many-days-over-10k.py
# =======
# 2019-08-02 - https://twitter.com/cz_binance/status/1157075839495761920
# # "Slap yourself,
# # if you sold $BTC under $10,000."
# 2020-07-18 - setup script to pull data from Bitmex UDF and create candles and highlights
@bretton
bretton / toonmusic.md
Last active Jul 5, 2020
bretton's toonmusic journey
View toonmusic.md
@bretton
bretton / ln-dashboard-list.md
Last active Jul 2, 2020
Dashboard tools for Lightning servers
View ln-dashboard-list.md

Lightning dashboards

clightning

NodeMonitor

NodeMonitor is a simple Python Django website that makes calls to Bitcoin (bitcoind) and Lightning Network (c-lightning lightningd) nodes and displays the results on a simple 'dashboard' style status page.

Zabbix clightning

@bretton
bretton / inbound-liquidity-ln.md
Last active May 16, 2020
How to get Inbound Liquidity on LN
View inbound-liquidity-ln.md

How to get Inbound Liquidity on LN

There are several ways you can find inbound liquidity on LN.

1. Wait

If your node is up 24x7 and you have some outgoing channels, the network will connect to you if you simply wait.

However, it might take a couple of weeks to get a significant amount of incoming liquidity, and ideally you want your outgoing liquidity to match too.

You can’t perform that action at this time.