Skip to content

Instantly share code, notes, and snippets.

Avatar

Mathieu Arnold mat813

View GitHub Profile
@mat813
mat813 / send-to-encrypted.sh
Created Jan 7, 2021
Script to send from an unencrypted zfs pool to an encrypted zfs pool
View send-to-encrypted.sh
#!/bin/sh
set -e
set -u
send=$1
receive=$2
echo "from $send"
echo "to $receive"
@mat813
mat813 / batch_stream.js
Created Nov 9, 2020
Batch transform stream javascript
View batch_stream.js
const { Transform } = require('stream');
const batchStream = (batchSize = 5) => {
let batch = [];
return new Transform({
objectMode: true,
transform(data, _, done) {
batch.push(data);
View summarize.rb
module Jekyll
module Filters
def summarize(str, splitstr = /\s*<div id="extended">/)
str.split(splitstr)[0]
end
end
end
@mat813
mat813 / gandi.rb
Last active Feb 28, 2019
OpenDNSSEC to Gandi
View gandi.rb
#!/usr/bin/env ruby
# frozen_string_literal: true
# ods-ksmutil key export --keystate ready -t KSK --all | ruby gandi.rb ready
# ods-ksmutil key export --keystate retire -t KSK --all | ruby gandi.rb retire
require 'pp'
require 'rubygems'
require 'dnsruby'
require 'xmlrpc/client'
@mat813
mat813 / LICENSE
Last active Jan 7, 2019
Scripts around acme_tiny to manage keys, requests, certificates...
View LICENSE
Copyright (c) 2016 Mathieu Arnold. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
@mat813
mat813 / named.aug
Created Jul 5, 2011
Bind's config augias lense (WIP)
View named.aug
(*
Module: Named
parses /etc/namedb/named.conf
Author: Mathieu Arnold <mat@FreeBSD.org>
About: Reference
This lens tries to keep as close as possible to the bind documentation where
possible. An online source being :
http://www.freebsd.org/cgi/man.cgi?query=syslog.conf&sektion=5
@mat813
mat813 / change-ns.rb
Last active May 30, 2017
OpenDNSSEC to SmallRegistry
View change-ns.rb
#!/usr/bin/env ruby
# frozen_string_literal: true
# vim:sw=2 sts=2:
require 'rubygems'
require 'dnsruby'
require 'epp-client/smallregistry'
require 'awesome_print'
require 'getoptlong'
@mat813
mat813 / gen_ds.rb
Last active May 30, 2017
OpenDNSSEC rollover helper
View gen_ds.rb
#!/usr/bin/env ruby
# frozen_string_literal: true
# ods-ksmutil key export --keystate XXX -t KSK --all | ruby gen_ds.rb
require 'pp'
require 'rubygems'
require 'dnsruby'
module Dnsruby
@mat813
mat813 / ripe.rb
Last active May 30, 2017
OpenDNSSEC to RIPE
View ripe.rb
#!/usr/bin/env ruby
# frozen_string_literal: true
# ods-ksmutil key export --keystate ready -t KSK --all | ruby ripe.rb ready
# ods-ksmutil key export --keystate retire -t KSK --all | ruby ripe.rb retire
require 'pp'
require 'rubygems'
require 'dnsruby'
require 'net/smtp'
View Makefile
# $Abso: Makefile,v 55f370ca4feb 2013/08/27 12:21:04 hg $
all: commit unsigned sign
SIGNED!= find -s * -name '*.signed'
sign: ${SIGNED}
COMMIT?=Update
UNSIGNED=/usr/local/var/opendnssec/unsigned/