Skip to content

Instantly share code, notes, and snippets.

Happy happy happy!

Niall Douglas ned14

Happy happy happy!
View GitHub Profile
ned14 /
Created Sep 3, 2020
Script to completely reset docker on zfs after Ubuntu zsysd has completely fubared your docker installation
# Ubuntu's zsysd creates snapshots within docker's zfs datasets, causing docker
# to fail to destroy them, which then completely wrecks the correspondance
# between zfs reality, docker's belief of zfs reality, and you are screwed.
# These are the commands I used to completely reset docker on zfs so it
# could be completely rebuilt.
# First things first: get rid of all the autozsys snapshots
service zsys stop
zfs list -H -o name -t snapshot | grep autozsys | xargs -n1 zfs destroy
ned14 / gist:9ed4b583b3064ad9f8bbb8e9fa2408b6
Created May 10, 2020
Chris Glover directory enumeration performance regression
ned14 / fs_probe_results.yaml
Created Apr 20, 2020
Samba to Hyper-V Linux ext4 with 9k frames
View fs_probe_results.yaml
timestamp: 2020-04-20 20:23:17 +0000
name: Microsoft Windows NT
ver: 10.0.19041
name: GenuineIntel Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
architecture: x64
physical_cores: 4
View Shitty WSL2 9p numbers
Running test latency:read:qd1:min ...
latency:read:qd1:min = 176800
Running test latency:read:qd1:mean ...
latency:read:qd1:mean = 235811
Running test latency:read:qd1:max ...
latency:read:qd1:max = 9119200
Running test latency:read:qd1:50% ...
latency:read:qd1:50% = 225700
Running test latency:read:qd1:95% ...
latency:read:qd1:95% = 297000

+++ title = "result<R, S>" weight = 20 +++

Header file result.hpp

namespace outcome_v2_xxx
namespace policy


Normal markdown code blocks with syntax highlighting:

template <class T> class foo;

The harder way which permits inline hyperlinking:

template <class T> class foo;

Note the link and syntax highlighting!

ned14 / PoorCachedIoPerformance.cpp
Last active Sep 5, 2017
Demos the poor cached i/o performance on Windows
View PoorCachedIoPerformance.cpp
/* Demos the poor cached i/o performance on Windows
Windows x64 with NTFS:
memcpy: 91.7057ns per 1Kb
Write: 1258.34ns per 1Kb
Read: 1318ns per 1Kb
Linux x64 with ext4:
ned14 /
Created Apr 11, 2017
Update all boostish libraries when configured as siblings
cd boost-lite
git checkout master
git checkout include/revision.hpp
git pull
git submodule update --init
mkdir -p build_posix
cd build_posix
cmake ..
cd ../..
ned14 /
Created Dec 30, 2016
Converts old, corrupted Pegasus Mail mail stores into portable mboxo or maildir stores suitable for import into almost any other mail client
# Converts Pegasus Mail v4.x .PMM files into Unix mbox files using lots
# of heuristics to repair any corruption in the Pegasus mail store
# (the "Unix mbox" feature of Pegasus produces malformed Unix mbox files)
# (C) 2016 Niall Douglas
# File created: Dec 2016
# Best used with python 3.6, anything older has a less able email and
# mailbox python modules
ned14 /
Last active Apr 30, 2016
mailinabox on lxc
cd /root
aptitude install curl git
git clone
cd mailinabox
(Use for the email and for the server)
cd /home/user-data/ssl/
nano private_key.pem
(Use cert private key)
chmod og-rwx private_key.pem