Skip to content

Instantly share code, notes, and snippets.

@maakuth
maakuth / xfs.txt
Last active October 9, 2020 11:51
Badly prepared benchmarks from my system, moving from mdraid+LVM to ZFS with SSD L2ARC.
#Note: This is backed by degraded md-raid6 PV
Using uid:1000, gid:1000.
Writing a byte at a time...done
Writing intelligently...done
Rewriting...done
Reading a byte at a time...done
Reading intelligently...done
start 'em...done...done...done...done...done...
Create files in sequential order...done.
Stat files in sequential order...done.
@maakuth
maakuth / indexer.rb
Created October 2, 2020 13:49
Here's a small thing I made that parses file_id.diz files from inside zip files and outputs some files into Internet Archive metadata format. I used this one to populate https://archive.org/details/suomipelit?tab=collection
#!/usr/bin/env ruby
require 'csv'
require 'zip'
require 'pp'
Zip.force_entry_names_encoding = 'ISO-8859-1'
entries = []
#!/usr/bin/env python3
"""
Yksinkertainen Long Playn epubien noutovempele.
Tarvitaan Python, Selenium, Firefox ja Geckodriver
Testatut versiot:
- Python 3.11.2
- Selenium 4.8.3
- Geckodriver 0.32.2 (https://github.com/mozilla/geckodriver)
- Firefox 111.0.1
@maakuth
maakuth / kcat-timestamps.py
Created June 21, 2023 09:58
Kcat timestamp parser
#!/usr/bin/env python3
# Use with kcat -f "%p,%o,%T\n" to parse message timestamps
from sys import argv
from datetime import datetime
import csv
for row in csv.reader(open(argv[1], 'r'), delimiter=','):
print(f"Partition {row[0]} offset {row[1]}: {datetime.fromtimestamp(int(row[2])/1000)}")