Skip to content

Instantly share code, notes, and snippets.

View lukechilds's full-sized avatar
☂️
Building @getumbrel

Luke Childs lukechilds

☂️
Building @getumbrel
View GitHub Profile

Ecash mints funded with Spillman channels: The ultimate nodeless Lightning wallet

Overview

This proposal introduces a self-custodial credit system that sits in front of an existing ecash mint. The users balance is held in a trustless credit contract that can be instantly swapped for ecash tokens offchain at the time of payment. Custodial risk only exists while payments are in flight, which is usually seconds, and only for the amount currently being transacted. The balance is always self-custodial and if the mint disappears or is uncooperative the user can unilaterally exit and reclaim their credits onchain.

The protocol works on Bitcoin today and does not require a soft fork or any new opcodes. Infact it doesn't require any opcodes at all. The protocol is almost entirely off chain, every possible way to execute the trustless credit contract results in a MuSig2 taproot key path spend onchain, no Bitcoin Script required.

The problem

@lukechilds
lukechilds / github-compare-to-release-notes.md
Created October 25, 2022 11:41
GitHub Compare to Release Notes

Generate pretty markdown release notes from GitHub compare view

Go to GitHub compare view between two release tags and dump the following in devtools:

copy(Array.from(document.querySelectorAll('#commits_bucket .Box-row')).map(e => {
    const commitTitle = e.querySelector('.Details p').textContent.replace(//g, '').trim();
    const authors = Array.from(e.querySelectorAll('.commit-author')).map(e => '@' + e.textContent);
    const commitUrl = e.querySelector('a[href*=\'/commit/\']').href;
 return `- ${commitTitle} - ${authors.join(' ')} ${commitUrl}`;
@lukechilds
lukechilds / install-cross-platform-emulators.md
Created October 25, 2022 06:14
Install cross platform emulators for Docker

Installs all cross platform emulators for use with docker buildx

docker run -it --rm --privileged tonistiigi/binfmt --install all
@lukechilds
lukechilds / tor-ssh.sh
Last active September 21, 2021 16:06
Setup or remove an SSH hidden service on Debian based systems
#!/usr/bin/env bash
#
# Setup or remove an SSH hidden service on Debian based systems.
#
# Usage:
#
# Setup SSH hidden service:
# $ curl -Ls https://git.io/tor-ssh | bash -s -- --setup-tor-ssh
#
# Remove SSH hidden service:
@lukechilds
lukechilds / umbrel-ubuntu-20-04-x86.md
Last active December 1, 2024 13:15 — forked from mayankchhabra/umbrel-ubuntu-20-04-x86.md
Installing Umbrel on Ubuntu 20.04 x86

Install Umbrel v0.3.7

sudo apt update -y
sudo apt install -y fswatch jq rsync curl
curl -fsSL https://get.docker.com | sudo sh
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/1.28.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo mkdir ~/umbrel
@lukechilds
lukechilds / how-to-install-tor.md
Last active March 20, 2023 16:25
How to install Tor

How to install Tor on your system

macOS

  • Open the "Terminal" app on your Mac and install Homebrew by running:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Install Tor by running:
brew install tor
@lukechilds
lukechilds / fix-umbrel-background-services.md
Last active March 10, 2021 02:11
Fix Umbrel Background Services

Fix Umbrel Background Services

If you aren't able to run OTA updates, you can do the following to resolve the situation:

Umbrel OS (Raspberry Pi)

If you're running the normal Umbrel OS install on a Raspberry Pi you can run this in a terminal on a computer connected to the same network as your Umbrel:

ssh -t umbrel@umbrel.local "mkdir -p umbrel/logs && sudo systemctl restart umbrel-startup"
@lukechilds
lukechilds / fix-custom-umbrel-install.md
Last active October 6, 2020 13:12
Fix OTA updates on custom Umbrel installs

Fix OTA updates on custom Umbrel installs

⚠️ Important: You only need to follow these instructions if you have a custom Umbrel install. If you're running Umbrel OS on a Raspberry Pi you can safely ignore this.

Custom Umbrel OS installs that started Umbrel with sudo scripts/start in an SSH sessions and then closed the SSH session encountered a bug where the OTA update script would not work due to missing file descriptors.

This has now been fixed (getumbrel/umbrel#269), however the update process for existing users involves manual steps.

@lukechilds
lukechilds / capture-tmux-scrollback-buffer.md
Created September 22, 2020 09:04
Capture tmux scrollback buffer

Capture tmux scrollback buffer

Using tmux session

Ctrl-b + :

capture-pane -S -10000

Ctrl-b + :