Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# 00infoLCD_wrapper.py
import os
import tkinter as tk
import platform
COLOR = "black"

Setup

Install additional tools

sudo apt-get install unclutter xterm

Raspi-Config

#!/bin/bash
function usage() {
echo -e "This checks if a LND invoice has been payed using the rhash"
echo -e ""
echo -e "Usage: $0 [-h|--help] [-v*|--verbose] [-r|--rhash STRING]"
echo -e ""
echo -e " -h, --help\t\tprint this help message"
echo -e " -v, --verbose\t\tbe more verbose"
echo -e " -r, --rhash STRING\tthe payment hash of the invoice (as HEX not BASE64!)"
#!/bin/bash
function usage() {
echo -e "This script generates a LND invoice and prints the payment request"
echo -e ""
echo -e "Usage: $0 [-h|--help] [-v*|--verbose] [-a|--amt STRING] [-m|--memo STRING]"
echo -e ""
echo -e " -h, --help\t\tprint this help message"
echo -e " -v, --verbose\t\tbe more verbose"
echo -e " -a, --amt STRING\tAmount in Satoshi"
#!/usr/bin/env python3
import random
import sys
"""
https://github.com/taikuukaits/SimpleWordlists/
The MIT License (MIT)
# -*- coding: utf-8 -*-
import string
from django import forms
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import models
class BaseEncryptedField(models.Field):
from channels.auth import AuthMiddlewareStack
from channels.db import database_sync_to_async
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.http.cookie import parse_cookie
@database_sync_to_async
def get_user(token_key):
try:
#!/usr/bin/env bash
#
# tor2ipc.sh
#
# License: MIT
# Copyright (c) 2020 The RaspiBlitz developers
set -e
set -u
def _send_request(self, path='/v1/getinfo') -> dict:
url = f'https://{self.hostname}:{self.port}{path}'
session = requests.Session()
try:
if self.tls_cert_verification:
adapter = CaDataVerifyingHTTPAdapter(tls_cert=self.tls_cert)
session.mount(url, adapter)
res = session.get(url,
#!/bin/bash
# store values from environment
env_IP2TOR_SHOP_URL=${IP2TOR_SHOP_URL-notset}
env_IP2TOR_HOST_ID=${IP2TOR_HOST_ID-notset}
env_IP2TOR_HOST_TOKEN=${IP2TOR_HOST_TOKEN-notset}
# if config file exists use it (but vars set from environment overwrite file vars)
if [ -f /etc/ip2tor.conf ]; then
unset IP2TOR_SHOP_URL