Skip to content

Instantly share code, notes, and snippets.

Avatar

bretton bretton

  • Cape Town, South Africa
View GitHub Profile
@bretton
bretton / hedged-ln-node.md
Last active Jun 21, 2022
Getting a 2:1 or greater risk-reward ratio on LN node and channels
View hedged-ln-node.md

Getting a 2:1 or greater risk-reward ratio on LN node and channels

WIP

Lets say a user wants to spin up a node with 0.1 btc, open a few channels, and generate routing fees.

How do they calculate a risk/reward ratio (RR) that makes economic sense?

What else can they do to improve the calculation, such as compartmentalising risk into discrete chunks which can be evaluated independently?

@bretton
bretton / getmagmaoffers.gql
Created Jun 15, 2022
Get Amboss Magma LN channel capacity offers API list
View getmagmaoffers.gql
query GetMagmaOffers {
getOffers {
list {
account
amboss_fee_rate
base_fee
base_fee_cap
fee_rate
fee_rate_cap
id
@bretton
bretton / lndhub-providers.md
Last active Jun 5, 2022
List of lndhub providers
View lndhub-providers.md
@bretton
bretton / washingtons-nft.md
Last active Sep 20, 2021
Washingtons NFT
View washingtons-nft.md

Washingtons, NFT with staking.

Mint a Washington

  • Limit of 2 minted per wallet. Transfer out to mint more.
  • No limit to number that can be staked afaik.
  • Staked Washingtons get unstable dollars per day.

WIP, been a slow minting after launch. Seems like most high volume NFT launches involve buying their own tokens and artificial hype.

Rare traits

@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 / 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 / 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 / toonmusic.md
Last active Oct 22, 2020
bretton's toonmusic journey
View toonmusic.md
@bretton
bretton / old-school-2-dec-2019.md
Last active Mar 7, 2020
Old School II - electronic music playlist
View old-school-2-dec-2019.md

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 / notakey-ubuntu-qemu-kvm.md
Last active Jul 13, 2022
Notakey Authentication Appliance on Ubuntu QEMU-KVM (unsupported by vendor)
View notakey-ubuntu-qemu-kvm.md

Introduction

Setup of an instance of the Notakey Authentication appliance running on Ubuntu with QEMU-KVM.

Update July 2022: this is out of date and needs an update for the newer version of the appliance

Sign up for license

Sign up for an evaluation license at https://www.notakey.com/

Download the legacy appliance

After you've signed up you will receive an email with download links for: