Skip to content

Instantly share code, notes, and snippets.

View openoms's full-sized avatar
🏗️
building

openoms openoms

🏗️
building
View GitHub Profile
@alexbosworth
alexbosworth / setup_npm.md
Last active October 5, 2023 16:37
Setup NPM

Install make

You will probably need build essential tools

# Ubuntu install build tools:
sudo apt-get install -y build-essential

Install Node.js

@vindard
vindard / do-lndbackup.sh
Last active March 15, 2019 15:19
A script designed for the "Raspibolt" configuration that creates a backup of the `.lnd` folder, packages it into a `.tar` archive and then uploads it to Dropbox
# NOTE: At 17 revision after ~2 weeks I think it's fair to say that this
# gist has grown into its own little project.
#
# Given this, I've moved the project across to its own proper repo now
# to facilitate better tracking & development. All further development
# can now be found at: https://github.com/vindard/lnd-backup
#
#---------------------------------------------------------------------------
#!/bin/bash
@fiatjaf
fiatjaf / .gitignore
Last active August 13, 2022 07:35
hsm_secret and custom invoices with lnurl on c-lightning
venv
*.swo
*.swp
__pycache__
@alexbosworth
alexbosworth / inotify-channel-backup.md
Last active March 29, 2024 01:33
Backup channel.backup file using systemd and inotify

LND backup script for channel.backup using inotify

Install inotify

sudo apt install inotify-tools

Create script to watch for changes and copy on change

@vindard
vindard / cln-sqlite-backup.sh
Last active February 7, 2023 11:41
A script built off of @alexbosworth's backup script that monitors lnd's `channel.backup` file for changes and uploads those changes to Dropbox when detected.
#!/bin/bash
# SET GPG KEY FOR ENCRYPTING WITH (COMPRESSES AS WELL)
GPG=""
# SET DROPBOX API KEY FOR UPLOADS
DROPBOX_APITOKEN=""
# OPTIONAL SET A DEVICE NAME TO BE USED FOR BACKUPS (DEFAULTS TO /etc/hostname)
DEVICE=""
@Engelberg
Engelberg / electrs on dojo
Last active October 5, 2022 18:26
Installing local electrum server that relies on the bitcoin daemon inside of Samourai Dojo for its data
I am successfully running a local electrum server, getting its data from dojo. This is useful for private use of hardware wallets.
Step 1: As Laurent MT suggested in the Samourai telegram group, you need to edit the docker-compose.yaml file, adding to the bitcoind section the following two lines
ports:
- "127.0.0.1:28256:28256"
Step 2: Follow install directions for electrs, an electrum server written in rust.
electrs install directions can be found here: https://github.com/romanz/electrs/blob/master/doc/usage.md
@LNBIG-COM
LNBIG-COM / BOA.md
Last active September 14, 2020 09:48
Balance-Oriented Autopilot

Balance-Oriented Autopilot

Preamble

I want to bring to your attention the autopilot algorithm, built on simple principles, but which is effective (from my point of view). There is no need to qualify network nodes by types such as for example: Merchant, Router, Useless (i used Vampire term) and so on. The algorithm is very simple and here is its description.

Description

  1. With some nodes we already have channels. We need to decide when we need to open new channels and with what capacity. We get a list of already open channels and create counters (accumulators) (newCapacity) with zero initialization for each node with which we have a channel.
@05nelsonm
05nelsonm / Copy bitcoind data to Dojo bitcoind container
Last active September 13, 2022 15:54
Samourai Dojo Copy Node Data
#### Copy over block data to your Dojo ####
## If you wanted to MOVE over the data instead of copying it, see --> https://gist.github.com/05nelsonm/5c3607a3ad7d138d908e8a3d985a0df0
## Written for use with Ubuntu Desktop 18.04 LTS & Dojo v1.0.0 ##
## On your machine running Dojo, open 2 terminals, we'll call them [terminal A] & [terminal Doc]
## In [terminal A] Check the size of your .bitcoin directory
$ df -hf ~/.bitcoin
## Getting LND working with Dojo
## Written for use with Ubuntu Desktop 18.04 LTS & Dojo v1.0.0 ##
## Start Dojo
$ cd /path/to/docker/my-dojo/ && sudo ./dojo.sh start
## Login to the bitcoind docker container as root
$ sudo docker exec -u root -it bitcoind /bin/bash
@normandmickey
normandmickey / BTCPayServer-RaspiblitzV1.3-RPI4B
Last active October 30, 2021 02:23
Install BTCPayServer on Raspiblitz V1.3 - Raspberry Pi 4B
These instructions are outdated.
Please visit https://btcpi.com for detailed instructions on installing BTCPayServer on the Raspberry Pi 4B.
#Install Dot-Net for ARM
cd /home/admin
sudo apt-get -y install libunwind8 gettext libssl1.0
wget https://download.visualstudio.microsoft.com/download/pr/9650e3a6-0399-4330-a363-1add761127f9/14d80726c16d0e3d36db2ee5c11928e4/dotnet-sdk-2.2.102-linux-arm.tar.gz
wget https://download.visualstudio.microsoft.com/download/pr/9d049226-1f28-4d3d-a4ff-314e56b223c5/f67ab05a3d70b2bff46ff25e2b3acd2a/aspnetcore-runtime-2.2.1-linux-arm.tar.gz
sudo mkdir /opt/dotnet