Skip to content

Instantly share code, notes, and snippets.

View mreschke's full-sized avatar

Matthew Reschke mreschke

  • Grand Junction, CO
View GitHub Profile
@mreschke
mreschke / speedtest-hd.sh
Created February 4, 2025 20:14
HD Speedtest bash script using dd or fio with nice results
#!/usr/bin/env bash
# Robust HD/SDD/NVMe performance CLI utility
# Utilizing FIO for sequential/random writes/writes
# Dependencies: fio (apt install fio)
# See: https://cloud.google.com/compute/docs/disks/benchmarking-pd-performance
# See: https://arstechnica.com/gadgets/2020/02/how-fast-are-your-disks-find-out-the-open-source-way-with-fio/
# mReschke 2024-01-18
# CLI Parameters
@mreschke
mreschke / balance.py
Last active June 5, 2025 22:59
Thread Loadbalancing (murmer vs int)
import struct
from murmurhash2 import murmurhash2, murmurhash3
# pip install murmurhash2
def murmur_hash_2(data, seed=0):
length = len(data)
nblocks = length // 4
h1 = seed
c1 = 0xcc9e2d51