Skip to content

Instantly share code, notes, and snippets.

apfelchips /
Last active February 5, 2024 23:48 — forked from snizovtsev/
Reproducing CrystalDiskMark tests with fio - fixes for
#!/usr/bin/env bash
## This script is based on and
LOOPS=1 #How many times to run each test
SIZE=32 #Size of each test, multiples of 32 recommended for Q32 tests to give the most accurate results.
WRITEZERO=0 #Set whether to write zeroes or randoms to testfile (random is the default for both fio and crystaldiskmark); dd benchmarks typically only write zeroes which is why there can be a speed difference.
QSIZE=$(($SIZE / 32)) #Size of Q32Seq tests
#!/usr/bin/env python3
# taken from
# generate server.pem with the following command:
# openssl req -new -x509 -keyout key.pem -out server.pem -days 365 -nodes
# run as follows:
# python
# then in your browser, visit:
# https://localhost:8443
import http.server
apfelchips /
Last active December 15, 2022 16:11 — forked from phrawzty/
simple python http server to dump request headers
#!/usr/bin/env python3
curl -s -H "X-Something: yeah" localhost:8080
curl --data "{\"this\":\"is a test\"}" localhost:8080
apfelchips / add-ssh-keys.yml
Created March 29, 2022 21:04 — forked from EntropyWorks/add-ssh-keys.yml
Add all the hosts from your ansible inventory to your .ssh/known_hosts and also use ssh-copy-id to add keys to the hosts
# Original idea found at
# ansible -i inventory.ini add-ssh-keys.yml
- name: Store known hosts of 'all' the hosts in the inventory file
hosts: localhost
connection: local
ssh_known_hosts_command: "ssh-keyscan -T 10"
apfelchips /
Last active October 16, 2023 15:06 — forked from ckuethe/
Ghidra Processor Documentation Downloader
#!/usr/bin/env python3
# vim: tabstop=4:softtabstop=4:shiftwidth=4:expandtab:
import os
import sys
import requests
docs = {
'68000': {
'M68000PRM.pdf': '',