Skip to content

Instantly share code, notes, and snippets.


openoms openoms

View GitHub Profile
openoms /
Last active Jun 14, 2022
Restore a CLN node on a Raspiblitz from the database backup on the SDcard

make !backups to your desktop! of:

  • hsm_secret (this is the root key for your onchain funds - can be regenerated from the CLN backup words)
    • stored on the SSD: /home/bitcoin/.lightning/bitcoin/hsm_secret
  • lightningd.sqlite3.backup (this is the realtime channals database backup saved to your SDcard by the backup plugin)
    • find it on the SDcard in /home/bitcoin/. If there are multiple backup files always use the latest one (the backups of the backup are dated and stored when the backup plugin is reinitialized - they can be discarded).

To start the process flash a new SDcard (keep your old SDcard as a backup) and make sure everything is working by starting a new (empty) CLN node and have bitcoind synced.

Upload the backups from your desktop (can use WinSCP on Windows):

openoms /
Last active Apr 4, 2022
Install Core Ligthning on a RaspiBolt - cleaned and modified from the RaspiBlitz
# CLVERSION=v0.10.2
# install the latest master by using the last commit id
# CLVERSION="063366ed7e3b7cc12a8d1681acc2b639cf07fa23"
openoms /
Last active Jan 3, 2022
A script to connect to sa shared VPN service with openvpn + set up a killswitch with UFW
sudo apt update
sudo apt install openvpn -y
## define config filename and credentials
echo "# Type or paste the config filename and press ENTER:"
read config; echo $config; echo
echo "# Type or paste the VPN username and press ENTER:"
openoms /
Last active May 14, 2022 — forked from solarmicrobe/
Add zerotier to TrueNAS
#! /usr/bin/env sh
pkg install wget -y
echo "# Check the latest version at:"
echo "# Which version to install?"
echo "# Example:"
echo "1.6.5"
openoms / gist:30674a7a2bcc85cd95254ad00b324d50
Created Jun 8, 2021 — forked from tr3buchet/gist:5105747
yubikey OR private key ssh authentication on debian
View gist:30674a7a2bcc85cd95254ad00b324d50

the grand idea

I like public key auth. I feel safer using them instead of a username and password login. But, I might not have my private key with me at a time where I need access.

I started using yubikey with LastPass and since I have it always on my keychain, I decided to find more ways to make use of it.

I wasn't originally aware, but if you pass a private key to ssh and sshd is configured to accept a key, it appears pam isn't used. Your authorized keys are checked and you are logged in. If you don't pass a private key, ssh falls back to the more standard un*x style login found in /etc/pam.d/sshd. This is where we'll add the yubikey pam. I am currently unaware of a way to use both public key auth and yubikey for login.

These steps worked for me on debian squeeze/wheezy.

more info at the yubico-pam github repo

openoms / twittermute.txt
Created Aug 27, 2020 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here:
openoms /
Created Aug 17, 2020 — forked from freenancial/
Convert xpub/xprv to zpub/zprv
import base58
x = 'xprv9s21ZrQH143K2f55zo5GiXiX16MiPzBgc2bEXNd77e1ooGsjxAyXjozyuniqiSB76VESjTW8s7vdsK3NFboha6tZgF9BzcDdNtUT6Aw99P2'
zp = b'\x04\xb2\x43\x0c'
base58.b58encode_check(zp + base58.b58decode_check(x)[4:]).decode('ascii')
# output: 'zprvAWgYBBk7JR8GjFTKfWeX8huXM2ecHEAgSFdg6AQssemZuUWCTVJeywKFxCe1iFUwumU4EQhFnSdjdtGVgzdjAaFmQvY3ARrbvLbjsLf6oNE'
# xprv = b'\x04\x88\xad\xe4'
# yprv = b'\x04\x9d\x78\x78'
# zprv = b'\x04\xb2\x43\x0c'
openoms /
Created Jan 16, 2020 — forked from CandleHater/
Initial setup on Debian (incl. Raspbian)
# bash <(curl -s
# show system info
echo "- system"
echo -e "Kernel\t: $(uname -rvm)"
cat /proc/cpuinfo | grep "model name" | sed "s/model name/CPU/g"
openoms /
Created Jun 11, 2019 — forked from mtigas/
Example code for running a (HTTP/HTTPS) Tor hidden service supporting subdomains.

The following files show an example of how to create subdomains for onion site hidden services. (This hasn't been tested for hidden services for anything other than HTTP/HTTPS.)

(You might also want to read our blog post about ProPublica’s Tor hidden service, including a tutorial and notes on running a hidden service: )

In general, this works (maybe just in recent Tor clients) because Tor will handle the connection to www.xxxxxxxxxxxxxxxx.onion as a connection to xxxxxxxxxxxxxxxx.onion. The encapsulated HTTP/HTTPS connection contains the subdomain in the Host: header (and in the case of HTTPS, the SNI

View Setting up LND to work with Dojo
## Getting LND working with Dojo
## Start Dojo
$ cd /path/to/docker/my-dojo/ && sudo ./ start
## Login to the bitcoind docker container as root
$ sudo docker exec -u root -it bitcoind /bin/bash
## Update and install a text editor
$ apt-get update && apt-get install nano