Skip to content

Instantly share code, notes, and snippets.

View openoms's full-sized avatar
🏗️
building

openoms openoms

🏗️
building
View GitHub Profile
@openoms
openoms / .gitignore
Last active August 13, 2022 07:37 — forked from fiatjaf/.gitignore
hsm_secret and custom invoices with lnurl on c-lightning
venv
*.swo
*.swp
__pycache__
@openoms
openoms / Fund c-lightning channel with JoinMarket.md
Created July 8, 2022 22:07 — forked from BitcoinWukong/Fund c-lightning channel with JoinMarket.md
Creating a Core Lightning channel funded by JoinMarket

Software Version

bitcoin core: 0.21.0
core lightning: 0.11.1
joinmarket: 0.9.6

Step 1:

@openoms
openoms / add_zerotier.sh
Last active May 14, 2022 20:56 — forked from solarmicrobe/add_zerotier.sh
Add zerotier to TrueNAS
#! /usr/bin/env sh
pkg install wget -y
echo "# Check the latest version at: https://www.freshports.org/net/zerotier/"
echo "# Which version to install?"
echo "# Example:"
echo "1.6.5"
read VERSION
@openoms
openoms / gist:30674a7a2bcc85cd95254ad00b324d50
Created June 8, 2021 05:43 — forked from tr3buchet/gist:5105747
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

@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
@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 / 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 / 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

## 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
#### 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