Skip to content

Instantly share code, notes, and snippets.

View openoms's full-sized avatar
🏗️
building

openoms openoms

🏗️
building
View GitHub Profile
@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
## 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 on Raspiblitz
Last active January 18, 2020 22:06
Install BTCPayServer on RaspiBlitz
#Install Dot-Net for ARM
cd /home/admin
sudo apt-get -y install libunwind8 gettext
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
sudo tar -xvf dotnet-sdk-2.2.102-linux-arm.tar.gz -C /opt/dotnet/
sudo tar -xvf aspnetcore-runtime-2.2.1-linux-arm.tar.gz -C /opt/dotnet/
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
dotnet --info
@miguelmota
miguelmota / gap_limit.py
Created June 1, 2018 23:58
Electrum wallet increase gap limit (number of receivable addresses)
wallet.change_gap_limit(10)
wallet.storage.write()
wallet.gap_limit
@21isenough
21isenough / check_ssh_tunnel.sh
Created May 10, 2020 09:44
Check if SSH still up, reconnect if not (run as a cron job)
#/bin/bash
DATE=$(date)
runAutossh() {
/usr/bin/autossh -M 20000 -Nf -R PORT:127.0.0.1:PORT USER@REMOTE_IP
if [[ $? -eq 0 ]]; then
echo Tunnel to REMOTE_IP created successfully
else
echo An error occurred creating a tunnel
@CandleHater
CandleHater / initial-setup.sh
Last active May 10, 2020 15:13
Initial setup on Debian (incl. Raspbian)
#!/bin/bash
# bash <(curl -s https://gist.githubusercontent.com/CandleHater/c36f8c205b31f70081d9e821bde36ebb/raw/initial-setup.sh)
# TODO
# - rename initial.sh + move gist to repo
# - bootloader configs https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711_bootloader_config.md
# - split up parts to several bash scripts and create repository
# apt packages
@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.
@tr3buchet
tr3buchet / gist:5105747
Last active June 8, 2021 05:43
yubikey OR private key ssh authentication on debian

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

@bretton
bretton / lnd-backup-restore-migrate.md
Last active July 27, 2021 04:34
LND Backup, Restore, Migrate
@normandmickey
normandmickey / BTCPi
Last active October 29, 2021 11:45
Install BTCPayServer on Raspberry Pi with Pruning and Fast Sync
Order from Lightning in a Box https://lightninginabox.co/product/btcpi/
or
Visit BTCPi.com for DIY instructions.