Skip to content

Instantly share code, notes, and snippets.

@nijave
nijave / crystal-disk-mark-fio-bench.sh
Last active July 10, 2022 02:11 — forked from O1ahmad/crystal-disk-mark-fio-bench.sh
CrystalDiskMark-esque Disk Benchmark (using fio)
#!/bin/bash
LOOPS=3 # How many times to run each test
SIZE=10240 # 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
SIZE+=m
QSIZE+=m
@nijave
nijave / python_apache_logs.py
Last active May 4, 2021 02:08 — forked from sumeetpareek/python_apache_logs.py
A very simple Apache access log parser in Python
#!/usr/bin/env python3
import json
import re
import sys
parts = [
r'(?P<host>\S+)', # host %h
r'\S+', # indent %l (unused)
r'(?P<user>\S+)', # user %u