Skip to content

Instantly share code, notes, and snippets.

View maxweisspoker's full-sized avatar

Maximilian Weiss maxweisspoker

View GitHub Profile
@maxweisspoker
maxweisspoker / gist:d5b2174b1ad325fa947bfbf5ea9b309e
Created July 5, 2026 08:47
working trezor-bridge for Qubes
#!/usr/bin/env python3
"""
Trezor HTTP bridge for Qubes OS.
Makes Trezor hardware wallets work with Trezor Suite and MetaMask (and
anything else that uses trezord or Trezor Connect) on Qubes OS, where the
Trezor is attached to an AppVM via USB-over-IP (qvm-usb).
The problem: Trezor Suite and MetaMask use WebUSB, which requires device
resets and continuous re-enumeration that break under Qubes USBIP. Simpler
@maxweisspoker
maxweisspoker / PKGBUILD
Created December 15, 2020 10:28
electrum-nmc PKGBUILD for Ledger HW wallet
# Maintainer: Maximilian Weiss <$(echo "bWF4QG1heHdlaXNzLmlv" | base64 -d)>
# Contributor: Jeremy Rand
# Contributor: The Namecoin Developers
# Contributor: The Electrum-DOGE Developers
# Contributor: The Electrum Developers
# Contributor: Thomas Voegtlin
# Contributor: The Bitcoin Developers
pkgname=electrum-nmc
pkgver=4.0.0a0.ledgerfix
---
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: psp.flannel.unprivileged
annotations:
seccomp.security.alpha.kubernetes.io/allowedProfileNames: docker/default
seccomp.security.alpha.kubernetes.io/defaultProfileName: docker/default
apparmor.security.beta.kubernetes.io/allowedProfileNames: runtime/default
apparmor.security.beta.kubernetes.io/defaultProfileName: runtime/default
@maxweisspoker
maxweisspoker / dockerfile-command
Last active November 2, 2025 11:42
Bash alias to print "Dockerfile" for image by using sed with "docker history"
alias dockerfile='script.sh'
script.sh:
#!/bin/bash
echo "FROM scratch"
docker history --no-trunc $@ | tac | tr -s ' ' | cut -d " " -f 5- | sed 's,^/bin/sh -c #(nop) ,,g' | sed 's,^/bin/sh -c,RUN,g' | sed 's, && , \\\n & ,g' | sed 's,\s*[0-9]*[\.]*[0-9]*\s*[kMG]*B\s*$,,g' | head -n -1
@maxweisspoker
maxweisspoker / get-whitepaper.py
Last active March 15, 2024 13:16
Python script to download the bitcoin whitepaper directly from the blockchain itself.
#!/usr/bin/env python
# This script is a modified version of the script found here:
# https://bitcoin.stackexchange.com/questions/35959/how-is-the-whitepaper-decoded-from-the-blockchain-tx-with-1000x-m-of-n-multisi
from __future__ import print_function
import subprocess
import sys
from binascii import unhexlify
from hashlib import sha256

Keybase proof

I hereby claim:

  • I am maxweisspoker on github.
  • I am maxweiss (https://keybase.io/maxweiss) on keybase.
  • I have a public key ASBDQ2UHiISnpQI2A4Xtt2ciLVBNBBnc1J2zLUZKblLeyAo

To claim this, I am signing this object: