Skip to content

Instantly share code, notes, and snippets.

View openoms's full-sized avatar
🏗️
building

openoms openoms

🏗️
building
View GitHub Profile
@openoms
openoms / BTCPayServer on Raspiblitz
Created January 23, 2019 11:55 — forked from normandmickey/BTCPayServer on Raspiblitz
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/201cbc49-c122-4653-a6c6-0680643d9a26/1951cfc077d868a31563a5a172d18d78/dotnet-sdk-2.1.500-linux-arm.tar.gz
wget https://download.visualstudio.microsoft.com/download/pr/9c5d6af2-868c-4021-8b25-4913daca41c3/46cfc8ddb9b8f10ebd56de1b1a534e32/aspnetcore-runtime-2.1.6-linux-arm.tar.gz
sudo mkdir /opt/dotnet
sudo tar -xvf dotnet-sdk-2.1.500-linux-arm.tar.gz -C /opt/dotnet/
sudo tar -xvf aspnetcore-runtime-2.1.6-linux-arm.tar.gz -C /opt/dotnet/
sudo ln -s /opt/dotnet/dotnet /usr/local/bin
dotnet --info
@openoms
openoms / do-lndbackup.sh
Last active March 11, 2019 09:39 — forked from vindard/do-lndbackup.sh
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
#!/bin/bash
# wget https://gist.github.com/openoms/7d62d0e02f121bc5d668ed4e1be1ebba/raw/a362385adfce44ad130af39e2ccc60086128173f/do-lndbackup.sh
# sudo chmod +x do-lndbackup.sh
# sudo ./do-lndbackup.sh
# DROPBOX API KEY
APITOKEN="DROPBOX-API-KEY"
if [ $APITOKEN="DROPBOX-API-KEY" ] ; then
###### User friendly interface script for use with ./dojo [command] ######
I set it up to be used with passwordless root login via ssh, as you need to be root to utilize
the ./dojo [commands], also because I run everything headless from my laptop. This may not be
for you if you don't want to permit root login to the machine running your Dojo. I have my VMs
set up with passwordless pubkeys and UFW so that my host machine is the only one that can login
to the VMs via ssh. It is somewhat of a security risk if you do not structure yourself properly,
so please be cautious.
At the end of the script there is haggard documentation on how to setup ssh pubkeys.
@openoms
openoms / electrs on dojo
Created June 10, 2019 13:10 — forked from Engelberg/electrs on dojo
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
#### Copy over block data to your Dojo ####
## On your machine running Dojo, open 2 terminals, we'll call them [terminal A] & [terminal Doc]
## In [terminal Doc] login to the bitcoind docker container as root
$ sudo docker exec -u root -it bitcoind /bin/bash
## [terminal Doc] Update and install a text editor
$ apt-get update && apt-get install nano
## Getting LND working with Dojo
## 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
## Update and install a text editor
$ apt-get update && apt-get install nano
@openoms
openoms / 0-hidden-service-subdomains.md
Created June 11, 2019 10:53 — forked from mtigas/0-hidden-service-subdomains.md
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: https://www.propublica.org/nerds/item/a-more-secure-and-anonymous-propublica-using-tor-hidden-services )

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

@openoms
openoms / initial-setup.sh
Created January 16, 2020 06:11 — forked from CandleHater/initial-setup.sh
Initial setup on Debian (incl. Raspbian)
#!/bin/bash
# bash <(curl -s https://gist.githubusercontent.com/CandleHater/c36f8c205b31f70081d9e821bde36ebb/raw/initial-setup.sh)
clear
# show system info
echo "- system"
echo -e "Kernel\t: $(uname -rvm)"
cat /proc/cpuinfo | grep "model name" | sed "s/model name/CPU/g"
@openoms
openoms / xpub_zpub_convert.py
Created August 17, 2020 08:02 — forked from freenancial/xpub_zpub_convert.py
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
openoms / twittermute.txt
Created August 27, 2020 06:22 — forked from IanColdwater/twittermute.txt
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet