Skip to content

Instantly share code, notes, and snippets.

@andrewfraley
andrewfraley / multi-speedtest.sh
Created December 3, 2023 04:36
Spawn many concurrent speedtest-cli instances to saturate a multi-gig connection
#!/bin/bash
# Spawns a speed test instance for every server in the speedtest --list output (~9 servers)
# apt install speedtest-cli
# or
# python3 -m pip install speedtest-cli
sptest="speedtest --server "
@andrewfraley
andrewfraley / verify_github_webhook_signature.py
Created March 12, 2019 21:19
Validate Github webhook signature/secret in python3
def validate_signature(payload, secret):
# Get the signature from the payload
signature_header = payload['headers']['X-Hub-Signature']
sha_name, github_signature = signature_header.split('=')
if sha_name != 'sha1':
print('ERROR: X-Hub-Signature in payload headers was not sha1=****')
return False
# Create our own signature
@andrewfraley
andrewfraley / pbs_on_rpi.md
Last active April 20, 2024 08:20
Backup a Raspberry Pi to Proxmox Backup Server using the Proxmox Backup Client

Backup a Raspberry Pi to Proxmox Backup Server using the Proxmox Backup Client

This works on a Pi 4, and should work on a Pi 3, but to work on a Pi Zero you would have to figure out how to compile your own client. More info in this thread on the Proxmox forums.

Determine if your Pi is 32bit or 64bit

Run the following command. If you get arm64, it's 64bit, otherwise you'll see armv7l which is 32bit.

uname -m