Skip to content

Instantly share code, notes, and snippets.

View openoms's full-sized avatar
🏗️
building

openoms openoms

🏗️
building
View GitHub Profile
@dennisreimann
dennisreimann / status.sh
Created December 6, 2019 15:38
BTC/LND Status Shell
#!/bin/sh
# by dennisreimann
# most of this is taken from Stadicus:
# https://stadicus.github.io/RaspiBolt/raspibolt_61_system-overview.html
# set colors
color_red='\033[0;31m'
color_green='\033[0;32m'
color_yellow='\033[0;33m'
color_blue='\033[0;34m'
@IanColdwater
IanColdwater / twittermute.txt
Last active May 23, 2024 18:37
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
@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
@chris-belcher
chris-belcher / work-diary.md
Last active October 4, 2023 16:53
Chris Belcher work diary
@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
@chris-belcher
chris-belcher / coinswap-design.md
Last active May 27, 2024 05:16
Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

Design for a CoinSwap Implementation for Massively Improving Bitcoin Privacy and Fungibility

25/5/2020

Abstract

Imagine a future where a user Alice has bitcoins and wants to send them with maximal privacy, so she creates a special kind of transaction. For anyone looking at the blockchain her transaction appears completely normal with her coins seemingly going from address A to address B. But in reality her coins end up in address Z which is entirely unconnected to either A or B.

Now imagine another user, Carol, who isn't too bothered by privacy and sends her bitcoin using a regular wallet which exists today. But because Carol's transaction looks exactly the same as Alice's, anybody analyzing the blockchain must now deal with the possibility that Carol's transaction actually sent her coins to a totally unconnected address. So Carol's privacy is improved even though she didn't change her behaviour, and perhaps had never even heard of this software.

@freenancial
freenancial / xpub_zpub_convert.py
Created August 5, 2020 06:31
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'
@laurentdebricon
laurentdebricon / raspiblitz-and-cloudflare.md
Last active March 18, 2022 14:31
Raspiblitz BTCpayserver on Clearnet with Cloudlare, without paying a VPN

Inspired by openoms tips box : http://tips.diynodes.com

If you already have a domain name setup with Cloudflare.com, you can easily do that, for free, without paying a VPN.

Trusting the vpn provider VS trusting Cloudflare. If that's ok for you go on :)

(for the example my domain is spiritualcomputing.com, be sure to replace it with yours) :

Go to cloudflare, dns, add 2 A records to your domain

NAME tips your_isp_public_ip
NAME pay your_isp_public_ip
@vindard
vindard / README.md
Last active March 29, 2022 19:20
Galoy graphql api demo for #LightningHackdayIST

Description

This gist contains 3 files that can be imported into postman to play with our api:

  • grapqhql_api collection which has our queries and mutations
  • devnet environment variables for local testing (uses regtest network)
  • staging environment variables for testing against our staging endpoint (uses testnet network)
#!/bin/bash
#alias lightning-cli="docker exec -it cln lightning-cli"
#docker exec -it cln lightning-cli getinfo
#working_path=/home/bitcoin/script-earning
BASEDIR=$(dirname $0)
working_path=${BASEDIR}
_now=$(date +"%d:%m:%Y")
JSON=`docker exec cln lightning-cli clboss-status | jq .offchain_earnings_tracker`
echo $JSON | jq -r 'map({in_earnings, in_expenditures}) | (first | keys_unsorted) as $keys | map([to_entries[] | .value]) as $rows | $keys,$rows[] | @csv' > $working_path/status.csv
awk -F"," '{x+=$1}END{print "Total earning: " x/1000}' $working_path/status.csv