Skip to content

Instantly share code, notes, and snippets.

Avatar

Sjors Provoost Sjors

View GitHub Profile
@Sjors
Sjors / README
Last active October 3, 2022 17:17
WOO-2022-0000202149 2e deelbesluit Wob-verzoek aanbevelingen en regelgeving cryptodienstverlening
View README
https://www.rijksoverheid.nl/documenten/woo-besluiten/2022/09/30/2e-deelbesluit-wob-verzoek-aanbevelingen-en-regelgeving-cryptodienstverlening
```sh
# On linux, use "sha256sum" instead of "shasum -a 256"
shasum -a 256 -c checksums.txt 2>&1 | grep OK
gpg -v --auto-key-locate=clear,wkd --locate-key sjors@sprovoost.nl
gpg --verify checksums.txt.asc
```
@Sjors
Sjors / functions.php
Created May 27, 2022 21:19
Disable billing fields for virtual products WooCommerce
View functions.php
add_filter('woocommerce_billing_fields','wpb_custom_billing_fields');
function wpb_custom_billing_fields( $fields = array() ) {
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false');
// No billing details
unset($fields['billing_first_name']);
unset($fields['billing_last_name']);
unset($fields['billing_company']);
unset($fields['billing_address_1']);
unset($fields['billing_address_2']);
@Sjors
Sjors / Welder
Last active September 20, 2021 13:40
Bitcoin Explained episode 9 transcript
View Welder
Participant #1:
Life permit. This is defend. Wishers NATO. That's right. Hello. Sure. Welcome back. Thank you. You confirmed your status as Bitcoin Core elite developer this week. Absolutely. Thanks to me, there has never been a more amazing way to send Bitcoin. This is absolutely groundbreaking. It changed everything. It changed nothing. Okay. Typically, this is not what the episode's gonna be about. The episode's gonna be about Lipstick P 256K, one library. That's right. But I want to know about this game changing technology that you just build and implement it. What is it? What does it do? Okay. So how did it change the world short. So there are many ways to send Bitcoin, but one of them is you download the Bitcoin Core software, and then it gives you a really nice graphical interface. You click at Mosi buttons and poof. So good. So far, so good. So far, so good. But there's also a command line way to do it. And especially if you need to do anything advanced, like using it with a hardware wallet, you'll ha
@Sjors
Sjors / overview.md
Last active December 4, 2021 11:01
Hardware Wallet Support in GUI and RPC, using HWI
View overview.md

Project: https://github.com/bitcoin/bitcoin/projects/15

Final User Experience

A user plugs in their hardware wallet and creates a new wallet. It automatigically detects the device and imports the keys:

The user can verify a receive address on their device with just a click:

View master @ 7d6f63cc2c2b9c4f07a43619eef0b7314474fffd
find output/ -type f -print0 | sort -z | xargs -r0 sha256sum
41c3b48d14163975f4fd27548a904b77fd3c8c816877f699add061871a1cae89 output/bitcoin-0.18.99-aarch64-linux-gnu-debug.tar.gz
f0ebbc072f5c1b5786e4468690396d7cf4522afef11b639e944f7b6d37760eec output/bitcoin-0.18.99-aarch64-linux-gnu.tar.gz
2c7358a14f8ffb25b5f3678e33d9ed94a17b0f8ed2523fc9d319aac3d7ccd025 output/bitcoin-0.18.99-arm-linux-gnueabihf-debug.tar.gz
34d7e7bc97f274d526042bc16a6bfdb9eccb96c9cf0b5eff269e07db27d2f1bd output/bitcoin-0.18.99-arm-linux-gnueabihf.tar.gz
912764cb7f740185d44658eadc817990b2cd08ae5c3db6135cacefa99244a5b6 output/bitcoin-0.18.99-i686-linux-gnu-debug.tar.gz
13a42d9dafa7a223c2c2d30b3fbf0d92ad2050480ae60d8f683f7142149779bd output/bitcoin-0.18.99-i686-linux-gnu.tar.gz
a1be0c8a543320237903c8b6f2848dc6112524a5f2979faf678aaf1cc9c79ad7 output/bitcoin-0.18.99-riscv64-linux-gnu-debug.tar.gz
62c5cae9eda45884be34ee25e2dc446ed1792a78f73f30d326f4e698bec6fa3e output/bitcoin-0.18.99-riscv64-linux-gnu.tar.gz
831ea3ccdb21f3be8483dd52c2ec7
@Sjors
Sjors / magic.sh
Created May 7, 2019 18:32
Install Bitcoin Core from Gitian
View magic.sh
sudo tar -xzvf /home/gitian/bitcoin-binaries/0.18.0/bitcoin-0.18.0-x86_64-linux-gnu.tar.gz -C /usr/local --strip 1
@Sjors
Sjors / README.md
Created May 6, 2019 13:09
LibrePatron without Docker (Ubuntu)
View README.md

Warning: this is highly experimental

It assumes you're already running BTCPay Server somehwere.

Create a user and group:

sudo adduser patron --disabled-password
@Sjors
Sjors / bitcoin.conf
Created August 26, 2018 09:09
Bitcoin Core remote dev
View bitcoin.conf
testnet=1
[main]
[test]
server=1
rpcpassword=bitcoin
rpcuser=bitcoin
@Sjors
Sjors / 2018-03 Code Block London.md
Last active March 24, 2018 13:13
Anatomy of a bitcoin transaction
View 2018-03 Code Block London.md

footer: 2018-03-24 - Code Block London - sjors@sprovoost.nl - @provoost on Twitter slidenumbers: true autoscale: false

Bitcoin's Moving Parts

  • Coins
  • Digital signatures
@Sjors
Sjors / fetch_and_sign.sh
Last active April 10, 2021 21:24
Fetches gitian assert files from VM and signs them on host machine
View fetch_and_sign.sh
#!/bin/sh
SIGNED_BINARIES=0
while getopts ":n:v:s" opt; do
case $opt in
n)
NAME=$OPTARG
;;
v)
VERSION=$OPTARG