Skip to content

Instantly share code, notes, and snippets.


Tobias Wellnitz dh1tw

View GitHub Profile
jm3 / hugo-giphy-shortcode.html
Last active May 30, 2020
Hugo embed for Giphy (responsive)
View hugo-giphy-shortcode.html
<!-- -->
<div style="width:100%;height:0;padding-bottom:40%;position:relative;">
<iframe src="{{ (index .Params 0) }}"
width="100%" height="100%" style="position:absolute"
frameBorder="0" allowFullScreen></iframe></div>
Jiab77 /
Last active Nov 20, 2021
Raspberry Pi 2/3B/B+/4B Wireless Bridge using Ubuntu Server 18.04 ARM Image and Netplan

Raspberry Pi 2/3B/B+/4B Wireless Bridge using Ubuntu Server 18.04 ARM Image and Netplan

The initial goal of this project is to use the raspberry pi in place of my Wireless Range Extender and then going from 3 wireless networks (2.4ghz, 2.4ghz extended, 5ghz) at home to only one (5ghz). This way I'm reducing the exposition to radio waves for the whole familly at home.

Let's go technical

Ok, enough drama for now, let's go technical. 😁


travisjeffery /
Last active Mar 6, 2021
How to do functional options in Golang

Here's the simplest example showing how to do functional options in Golang.

They're a great way to enable users to set options and ease adding new options later.

package main

import (
qrkourier /
Last active Oct 11, 2021
Install a Server Certificate For oVirt Manager UI

Install server certificates issued by a private CA in oVirt4 Manager and Host

  • generate a signing request on the system where oVirt Manager is running (the engine server)
openssl req -new -sha256 -key /etc/pki/ovirt-engine/keys/apache.key.nopass -out /tmp/engine.csr
  • Submit the CSR to the issuer and wait. Or, if you are the issuer and you happen to be using FreeIPA/IdM, you may issue the certificate with ipa-admintools. For example,
NathanGiesbrecht / noip2.service
Last active Nov 21, 2021
Systemd Service file for dynamic ip updater
View noip2.service
# Simple Dynamic DNS Updater
# By Nathan Giesbrecht (
# 1) Install binary as described in's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl daemon-reload`
# 5) Execute `sudo systemctl enable noip2`
# 6) Execute `sudo systemctl start noip2`
TheHippo / Makefile
Created Mar 31, 2016
Golang Makefile example
View Makefile
OUT := binariy-name
PKG :=
VERSION := $(shell git describe --always --long --dirty)
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/)
all: run
go build -i -v -o ${OUT} -ldflags="-X main.version=${VERSION}" ${PKG}
spalladino /
Created Dec 22, 2015
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
johanndt /
Last active Jul 6, 2020 — forked from dideler/
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu


Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
magnetikonline /
Last active Sep 18, 2021
BIND - delegate a sub domain for a zone.

BIND - delegate a sub domain for a zone

The scenario:

  • DNS zone defined in BIND.
  • Authoritative name server at
  • Subzone with an authoritative name server at
  • Wishing to forward sub-zone to authoritative name server.


magnetikonline /
Last active Jan 31, 2020
Install Parallels version 10/11/12/13 tools on Ubuntu server guest.

Install OSX Parallels version 10/11/12/13 tools on Ubuntu server guest

Have tested these instructions successfully under Ubuntu 16.04LTS and 14.04LTS.

  • Create Ubuntu server instance under Parallels (obviously).
  • Start VM, goto Actions - Install Parallels Tools... to mount the ISO image.
    • Note: if this fails, or updating tools for an existing guest you can do the following:
    • Goto Devices > CD/DVD 1 > Connect Image....
    • Select the following ISO image: /Applications/Parallels Desktop/Contents/Resources/Tools/prl-tools-lin.iso.
    • This will mount the tools CD image.
  • From the terminal, run the following commands: