Skip to content

Instantly share code, notes, and snippets.

Miek Gieben miekg

Block or report user

Report or block miekg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@miekg
miekg / udpserv.go
Created May 10, 2017
Simple udp server in Go
View udpserv.go
package main
import (
"log"
"net"
)
func main() {
// listen to incoming udp packets
pc, err := net.ListenPacket("udp", ":1053")
@miekg
miekg / udpserv.c
Created May 10, 2017
udp server in C
View udpserv.c
/*
* udpserver.c - A simple UDP echo server
* usage: udpserver <port>
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <netdb.h>
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.
@miekg
miekg / coredns.yaml
Created Jan 13, 2018
CoreDNS kubernetes deployment yaml
View coredns.yaml
apiVersion: v1
kind: Service
metadata:
name: coredns
spec:
ports:
- name: coredns
port: 53
protocol: UDP
targetPort: 53
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 / 14-add-lockaftersleep-patch
Created Mar 8, 2014
add -lockaftersleep to xautolock
View 14-add-lockaftersleep-patch
Description: Add -lockaftersleep
Lock the moment the machine comes out of sleep.
.
xautolock (1:2.2-4) unstable; urgency=low
.
* debian/control:
- Removed xautolock from Recommends since it was removed from Debian
- Standards-Version: 3.9.4
- Depends: debhelper (>= 9)
* debian/compat: 9
@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 / 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>
View Makefile.inc
# Makefile for building our Docker containers
#
# You can override ARCH and REGISTRY, the default to "amd64 arm arm64 ppc64le s390x" and "miek"
# If you need to get an asset before building use the asset rule. The asset needs to be copied
# to $(arch):
#
# asset:
# cp $(COREDNS)/coredns $(arch)/coredns
ifeq (, $(shell which manifest-tool))
@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
You can’t perform that action at this time.