Skip to content

Instantly share code, notes, and snippets.

View vicariousdrama's full-sized avatar

Vic vicariousdrama

View GitHub Profile
@vicariousdrama
vicariousdrama / bulknpub2hex.py
Created April 8, 2024 05:26
Quick python script to convert a file with a list of npubs into hexadecimal pubkeys
#!/usr/bin/env python3
from nostr.key import PublicKey
import os
import shutil
import sys
filename = "listofnpubs.txt"
if not os.path.exists(filename):
sys.exit("File does not exist")
with open(filename) as f:
@vicariousdrama
vicariousdrama / listids2npubs.sh
Created January 14, 2024 20:15
Jam Systems Data Dumps
rhost=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' deployment-pantryredis-1)
rcursor=-1
while [[ "$rcursor" -ne 0 ]]; do
if [[ "$rcursor" -eq -1 ]]
then
rcursor=0
fi
rdata=$(redis-cli -h "$rhost" SCAN "$rcursor" MATCH "identities/*")
rcursor=$(expr "$rdata" : '\([0-9]*[0-9 ]\)')
keys=${rdata//$rcursor/}
@vicariousdrama
vicariousdrama / readme.md
Created December 3, 2023 04:15
How to manually get an invoice for LNURL address

Example address: brownkat@getalby.com

Call LNURL Payment address supplementing domain, and the username portion

  • username: brownkat
  • domain: getalby.com

URL would be composed as: https://getalby.com/.well-known/lnurlp/brownkat

Open the url in your browser, and the response will look similar to this

@vicariousdrama
vicariousdrama / gist:4e57aa4c961ce7491c053e4e58908bd8
Created November 22, 2023 21:48
Nostr Nests - Javascript iframe injection
This is the basic logic to paste into the address bar to add an iframe
```js
javascript:(() => {roomname=window.location.pathname.substr(1);const iframe=document.createElement('iframe'); iframe.width='100%'; iframe.height='750'; iframe.src='https://dddice.com/room/C1vhrpm'; document.body.insertBefore(iframe, document.body.firstChild);})();
```
@vicariousdrama
vicariousdrama / kioskwebsites.html
Created March 14, 2023 15:59
Kiosk Website Cycler
<!DOCTYPE html><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Vicarious Drama Kiosker</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body, html {
margin: 0;
height: 100%;
}
@vicariousdrama
vicariousdrama / Drop Non-Useful Nodes
Last active September 18, 2023 15:33
A script for dropping connections from old version nodes or other characteristics
This script is written for linux.
1. Download the file
2. Review it
nano ./dropnonusefulnodes.sh
3. Mark it as executable `chmod +x dropnonusefulnodes.sh`
@vicariousdrama
vicariousdrama / lnd-channel-backup-to-webdav.sh
Last active December 18, 2022 09:30
Monitor a file for changes and backup to WebDAV instance (Tested with Nextcloud)
#!/bin/bash
# To configure settings for this script, run the script directly at the command
# line. A configuration file will be created as the same name as this script
# with a .json extension that will contain the values that will be used at
# runtime.
# As with any script, you should review it before running it. The main entry
# point is at the end of the file after variable initializations and function
# declarations are made.
@vicariousdrama
vicariousdrama / lnd-channel-backup-to-remote.sh
Created September 30, 2022 01:17
Monitor a file for changes and backup to remote host
#!/bin/bash
# To configure settings for this script, run the script directly at the command
# line. A configuration file will be created as the same name as this script
# with a .json extension that will contain the values that will be used at
# runtime.
# As with any script, you should review it before running it. The main entry
# point is at the end of the file after variable initializations and function
# declarations are made.
@vicariousdrama
vicariousdrama / 750499.md
Last active August 3, 2023 13:30
borders

A way to produce a deterministic brain wallet for temporary use while crossing borders without physical paper, devices, or need to memorize 12 or 24 seed words.

Find a URL that will be widely available for a time, will remain consistent, and is easy enough to remember

August 2023 -- Twitter is owned by Elon Musk and he's rebranding it to X. As of early August 2023, the URI above still references the preferred favicon file, but this is likely going to change. This demonstrates why this kind of wallet should be fairly short lived. Don't choose a resource that is going through turmoil itself. You may want to consider choosing an image available on the Internet Wayback machine based on URL and date. For example: https://web.archive.org/web/20230601000430im_/https://abs.twimg.com/favicons/twitter.2.ico

diff --git a/test/functional/feature_checktemplateverify.py b/test/functional/feature_checktemplateverify.py
index db312c026..5908bb01d 100755
--- a/test/functional/feature_checktemplateverify.py
+++ b/test/functional/feature_checktemplateverify.py
@@ -249,9 +249,7 @@ class CheckTemplateVerifyTest(BitcoinTestFramework):
amount_sats=amount_sats,
)
- self.log.info(
- "Creating funding txn for 10 random outputs as a p2sh script (impossible to spend)"