Skip to content

Instantly share code, notes, and snippets.

View x.go
package main
import (
"fmt"
"log"
"os"
"github.com/miekg/dns"
)
@miekg
miekg / coredns.md
Created Mar 25, 2021
coredns overlay plugin
View coredns.md

Corefile is:

example.com {
    file db.example.com
    debug
    lboverlay example.com
    forward . 8.8.8.8
}
View grafana.md

Simplify Grafana

Goal: a minimal grafana that is 100% provisioned via files. There is no U/I to add dashoards on the fly.

  • A (go?) package, contains structs that define the dasbhoards, either see what grafana has or cleanup: https://github.com/grafana-tools/sdk
  • Dashboard are put in folders and may have tags
  • Dashboards are defined in (minimal) YAML
  • Everything is defined on a per-dashboard basis - consistency is put in the generate dashboard layer.
View gist:993dcbde700dc3a9844e7e783f189059
# Force resigning
$ rm /var/lib/coredns/db.miek.nl.signed
[ERROR] plugin/file: Failed to open zone "miek.nl." in "/var/lib/coredns/db.miek.nl.signed": open /var/lib/coredns/db.miek.nl.signed: no such file or directory
$ kill -SIGUSR1 $(pidof coredns)
[INFO] SIGUSR1: Reloading
[INFO] Reloading
@miekg
miekg / 7511.xml
Created Nov 24, 2018
RFC 7511 in XML format
View 7511.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- name="GENERATOR" content="github.com/mmarkdown/mmark Mmark Markdown Processor - mmark.nl" -->
<rfc version="3" ipr="trust200902" submissionType="IETF" category="info" xml:lang="en" consensus="true" xmlns:xi="http://www.w3.org/2001/XInclude" number="7511">
<front>
<title abbrev="Scenic Routing for IPv6">Scenic Routing for IPv6</title><seriesInfo value="7511" stream="IETF" status="informational" name="RFC"></seriesInfo>
<author initials="M." surname="Wilhelm" fullname="Maximilian Wilhelm"><organization></organization><address><postal><street></street>
<city>Paderborn, NRW</city>
<country>Germany</country>
</postal><phone>+49 176 62 05 94 27</phone>
@miekg
miekg / learninggo-2.txt
Created Aug 27, 2018
Learning Go in RFC 7749 format
View learninggo-2.txt
Go Working Group R. Gieben
Internet-Draft August 25, 2018
Intended status: Informational
Expires: February 26, 2019
@miekg
miekg / learninggo-2.txt
Created Aug 27, 2018
Learning Go (rfc 7749 output)
View learninggo-2.txt
Go Working Group R. Gieben
Internet-Draft August 25, 2018
Intended status: Informational
Expires: February 26, 2019
View learninggo.txt
Go Working Group R. Gieben
Internet-Draft 25 August 2018
Intended status: Informational
Expires: 26 February 2019
View rfc3514.txt
Network Working Group S. Bellovin
Internet-Draft AT&T Labs Research
Expires: 3 October 2018 1 April 2018
The Security Flag in the IPv4 Header
@miekg
miekg / main.go
Created Mar 17, 2018
DNS over HTTP/2
View main.go
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"github.com/miekg/dns"