Skip to content

Instantly share code, notes, and snippets.

View robn's full-sized avatar
🤖
𝙴𝚅𝙴𝚁𝚈 𝚃𝙸𝙼𝙴 𝙸𝚂 𝙲𝙾𝙼𝙿𝚄𝚃𝙴𝚁 𝚃𝙸𝙼𝙴

Rob Norris robn

🤖
𝙴𝚅𝙴𝚁𝚈 𝚃𝙸𝙼𝙴 𝙸𝚂 𝙲𝙾𝙼𝙿𝚄𝚃𝙴𝚁 𝚃𝙸𝙼𝙴
View GitHub Profile
@robn
robn / zfs-chapoly.md
Created December 2, 2022 10:02
Initial performance checks for OpenZFS with Chacha20-Poly1305

Initial performance checks for OpenZFS with Chacha20-Poly1305

Setup:

# create a ramdisk, and an encryption key
mount -t tmpfs -o size=1024M none /mem
fallocate -l 1024M /mem/file
echo myzfskey > /tmp/zfskey
@robn
robn / gist:9a3798ae011529a09f12ba439e097aa9
Created September 5, 2018 05:53
prom_file_exporter.pl
#!/usr/bin/env plackup
# grab all the .prom files from PROM_FILE_EXPORTER_METRICS_DIR PATH hand them to
# anyone that asks
use warnings;
use strict;
use Path::Tiny;
.fat_score, .fat-score {
z-index:-9999;
}
.mc-advert,
.current-players,
.fat-score,
.stream-switcher,
.MC-streamButtons,
.MC-statsNav {
display: none;
@robn
robn / gist:a3d90aa8f7c0b4ef2c13f3ec60324585
Last active August 10, 2017 06:03
just mail dns things
$ dig +short -t txt fastmail.com
"v=spf1 include:spf.messagingengine.com ?all"
$ dig +short -t txt spf.messagingengine.com
"v=spf1 ip4:66.111.4.0/24 ip4:107.150.24.0/24 -all"
dig +short -t cname fm1._domainkey.fastmail.com
fm1.fastmail.com.dkim.fmhosted.com.
$ dig +short -t txt fm1.fastmail.com.dkim.fmhosted.com.
;; Truncated, retrying in TCP mode.
"v=DKIM1\; k=rsa\; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4aslbfO87x49Qy3uq70spE8y21YN22+PRgMjGZ6y2Tnqv/cbqeYYPqemesuTsyZNLhBNM8hzJ/RR4EDe4rpEMMWc7zyxQKO+SEkSfJyREANzDBCwLzIjQt9Vr7hQ+xpfz4m6c6bj8e7sWaH7AhacTw2nz7eqlo4K96BCc0tMmEXSYQZXdSLgT8In/Qu9qJNJw" "7sAuZEqIN7dNPoyRRdxEmnLaN2o8rI/IsQrfGcRCpKnpNcvPSXpe3o0/CSV3a+uSDNV8hrEWqNunGtPNMgiq2uA+uBM4z9EL6UTgN91D6V2vRnIHlzdG1uAkiy19TB8nAfo9GZ1pOnELXpM6EnKFwIDAQAB"
$ dig +short -t txt _dmarc.fastmail.com

The JMAP Test Suite

JMAP! Does it work?

If you've been a regular follower of the FastMail blog, you've heard of JMAP. If you haven't, go check out that link. You'll get to see Neil and Bron telling you why it's cool. If you're really into the idea, you might also like reading the spec, which is quite easy to read and presented in soothing FastMail Blue.

package ME::Bort::Plugin::Remote;
use 5.014;
use warnings;
use strict;
use Twiggy::Server;
use Atto qw(hello);
my $Server;
@robn
robn / crc32-kernel.c
Created October 14, 2015 21:23
crc32 using Linux AF_ALG
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/socket.h>
#include <linux/if_alg.h>
#include <sys/param.h>
#include <string.h>
#include <strings.h>
@robn
robn / crc32-kernel.c
Created October 14, 2015 04:17
crc32 using Linux AF_ALG interface. pros: works on all Linux since 2.6. cons: context switch overhead will destroy you :(
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/socket.h>
#include <linux/if_alg.h>
#include <sys/param.h>
#include <string.h>
#include <strings.h>
@robn
robn / clutter-image.pl
Created September 15, 2015 11:28
Clutter-perl gravity transition test (port of clutter image-content sample)
#!/usr/bin/env perl
use 5.020;
use warnings;
use strict;
use Clutter;
use Imager;
my @gravities = qw(
@robn
robn / UNKNOWN.0.txt
Created June 21, 2015 02:26
TIS-100 secret level solution
@0
@1
MOV 0, ACC
SAV
MOV UP, ACC
JLZ OUT
ADD 10
SUB 30