Skip to content

Instantly share code, notes, and snippets.

@emschu
emschu / dot_stubby_config_generator.py
Last active January 31, 2021 12:07
Generate resolver configuration with (dynamic) SPKI info for stubby/OpenWRT
import subprocess
# get spki of dns servers and generate a stubby compatilble configuration
# Never blindly trust the output! Verify it on your own by hand!
# configure DoT servers here
servers = {
1: {"ip": ["49.182.19.48"], "server": "dns2.digitalcourage.de", "port": "853" },
2: {"ip": ["2a02:2970:1002::18"], "server": "dns2.digitalcourage.de", "port": "853" },
@emschu
emschu / README.md
Last active March 25, 2022 20:29
Wordpress Plugin Development Docker Container with wp-cli

Wordpress Plugin Development Docker Image with wp-cli

Use flexible docker development containers for WP Plugin development by using wp-cli to automate setup instructions and use reproducible environments

Your local plugin directory will be mounted as a volume, so your code changes are available immediately.

This container is a non-root container by default.

The following files help you to generate a fresh wordpress installation with admin:password (Mail: test@test.local) as initial login credentials and some common debug options enabled. Wordpress container port is expected to be 8000 on your container host.

@emschu
emschu / MIB_TREE_TO_JSON_TREE_README.md
Last active June 4, 2020 09:16
Generate JSON OID Tree and catalog representation

How-To generate a JSON Tree out of a MIB Tree

This is an approach to generate dynamically a JSON representation of an OID tree (=an(y) SNMP MIB) using mibdump.py of python pysmi.

We will generate a flat list of OID objects (oid_catalog.json) + hierarchical json tree (oid_tree.json) with "."-separated nodes of RFC 1213 MIB.

1. Setup + get MIB(s) as JSON

$ pip install pysmi
# walk into and/or create a new directory you run the following command in