Skip to content

Instantly share code, notes, and snippets.

View Sjors's full-sized avatar

Sjors Provoost Sjors

View GitHub Profile
@Sjors
Sjors / magic.sh
Created May 7, 2019 18:32
Install Bitcoin Core from Gitian
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 / robot_user_agents.rb
Created August 3, 2011 00:08
Recognize search engines and spammers using user-agents.org
require 'net/http'
require 'xmlsimple'
url = "http://www.user-agents.org/allagents.xml"
xml_data = Net::HTTP.get_response(URI.parse(url)).body
data = XmlSimple.xml_in(xml_data)
agents = data['user-agent'].select{|agent| type = agent["Type"].first; type.include?("R") || type.include?("S")}
agent_names = agents.collect {|agent| agent["String"].first}
@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
#!/bin/sh
SIGNED_BINARIES=0
while getopts ":n:v:s" opt; do
case $opt in
n)
NAME=$OPTARG
;;
v)
VERSION=$OPTARG
@Sjors
Sjors / Welder
Last active September 20, 2021 13:40
Bitcoin Explained episode 9 transcript
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
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 / Gemfile.lock
Created April 14, 2012 12:35
Gemfile on April 14
GIT
remote: git://github.com/flying-sphinx/flying-sphinx.git
revision: 49bfed5d91b0afb06390fd50f4e058662f342907
specs:
flying-sphinx (0.6.4)
faraday_middleware (~> 0.7.0)
multi_json (>= 1.0.1)
net-ssh (>= 2.0.23)
rash (~> 0.3.0)
riddle (>= 1.5.0)
@Sjors
Sjors / functions.php
Created May 27, 2022 21:19
Disable billing fields for virtual products WooCommerce
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']);

EC2 settings

  • Instance type: t2.xlarge
  • vCPUs: 4
  • Memory (GiB): 16
  • General Purpose SSD (GP2): 200 GB
  • Ubuntu
  • Running in eu-central-1b (Frankfurt)

Hint: to make your life easier and allow login with a simple ssh btc-0.14, edit ~/.ssh/config:

@Sjors
Sjors / .gitignore
Last active September 8, 2022 03:15
node_modules
*.pdf
@Sjors
Sjors / README
Last active October 3, 2022 17:17
WOO-2022-0000202149 2e deelbesluit Wob-verzoek aanbevelingen en regelgeving cryptodienstverlening
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
```