Skip to content

Instantly share code, notes, and snippets.

View maxweisspoker's full-sized avatar

Maximilian Weiss maxweisspoker

View GitHub Profile
@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 October 8, 2023 02:10
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: