Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Happy happy happy!

Niall Douglas ned14

💭
Happy happy happy!
View GitHub Profile
@ned14
ned14 / reset_docker_on_ubuntu_zfs.sh
Created Sep 3, 2020
Script to completely reset docker on zfs after Ubuntu zsysd has completely fubared your docker installation
View reset_docker_on_ubuntu_zfs.sh
# 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
ned14 / gist:9ed4b583b3064ad9f8bbb8e9fa2408b6
Created May 10, 2020
Chris Glover directory enumeration performance regression
@ned14
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
system:
os:
name: Microsoft Windows NT
ver: 10.0.19041
cpu:
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
View result.md

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

Header file result.hpp

namespace outcome_v2_xxx
{
namespace policy
{

View hyperlinking-in-code-blocks.md

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
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
ned14 / upd.sh
Created Apr 11, 2017
Update all boostish libraries when configured as siblings
View upd.sh
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
ned14 / pegasus_mail_to_mbox.py
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
View pegasus_mail_to_mbox.py
#!/usr/bin/python3
# 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 http://www.nedprod.com/
# File created: Dec 2016
#
# Best used with python 3.6, anything older has a less able email and
# mailbox python modules
@ned14
ned14 / mailinabox.sh
Last active Apr 30, 2016
mailinabox on lxc
View mailinabox.sh
cd /root
aptitude install curl git
git clone https://github.com/ned14/mailinabox.git
cd mailinabox
DISABLE_FIREWALL=1 setup/start.sh
(Use usual@nedprod.com for the email and mail.nedprod.com for the server)
cd /home/user-data/ssl/nedprod.com
nano private_key.pem
(Use nedprod.com cert private key)
chmod og-rwx private_key.pem