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 / ai-platforms-image-creation.md
Last active August 30, 2022 06:14
AI platforms for content and image generation
@bretton
bretton / hedged-ln-node.md
Last active June 21, 2022 21:07
Getting a 2:1 or greater risk-reward ratio on LN node and channels

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 June 15, 2022 07:28
Get Amboss Magma LN channel capacity offers API list
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 June 5, 2022 21:10
List of lndhub providers
@bretton
bretton / washingtons-nft.md
Last active September 20, 2021 20:29
Washingtons NFT

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 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 / 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 / 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 / toonmusic.md
Last active October 22, 2020 15:35
bretton's toonmusic journey
@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.