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
bretton / random-lightning-qrcodes.md
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
bretton / toonmusic.md
Last active October 22, 2020 15:35
bretton's toonmusic journey
@bretton
bretton / changepass.php
Last active September 23, 2020 12:06
simple php form to change samba password
<?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 / bitmex-plotinit-plotly.py
Last active August 8, 2020 17:53
Bitmex price and volume chart using UDF datasource, with Python and Bokeh for chart
#!/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 August 2, 2020 07:53
How many days over $10k since CZ tweet to "slap yourself" for selling below that price?
#!/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 / old-school-2-dec-2019.md
Last active March 7, 2020 17:25
Old School II - electronic music playlist

Intro

Over 9-22 December 2019 I did a daily run of 2-3 old school tracks for this Sounds of Stereophoenix electronic music appreciation group.

About 5 years ago I'd spent 4 months cataloguing what others had posted. ~10 tracks listened to, logged, per day.

Over the last year I've been submitting a couple tracks a day, squaring youtube & soundcloud AIs against each other in a sense.

The following was my holiday project, and shows my age. Purpose was to find cool stuff, not just the latest flashy novelty.

This is a subset of a larger collection for the project, specifically the tracks I shared with the group in the same order.

@bretton
bretton / lightning-pi-odroid-articles.md
Last active January 1, 2020 05:52
Collection of tutorials for running Lightning on low cost hardware
@bretton
bretton / improved-install.md
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

Intro

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
bretton / fetchlunohistory.sh
Last active August 7, 2019 08:19
Fetch Luno trade history and save as CSV for charting purposes
#!/bin/bash
#
# About
#
# fetchlunohistory.sh
# get date in epoch time of last trade in csv
# get trades from luno from this time
# reverse order
# append to big log of all trades
#
@bretton
bretton / smiley-frebs.md
Last active May 29, 2019 04:50
Smiley Frebs

I need a word for the people who pass by pleasantly

you see them now and then, have no beef or grit with them, nor any intimacy.

just mildly to seriously, pleased, to see a friendly face

to engage too closely with introductions is to lead to more intimate things like BBQs and hiking, even sex, which can become too much if not looking for it.

The enjoyment comes from distance and lack of baggage, a sheer pleasantness for passing by.