Skip to content

Instantly share code, notes, and snippets.

View towo's full-sized avatar

Tobias Wolter towo

View GitHub Profile
@towo
towo / README.md
Created February 16, 2024 13:10
Adding entries to kea database with audit

ISC's Kea is gating "comfortable" database management for the configuration backend via a service subscription, so I'll gather what you need to add miscellaneous entries to the database.

At the end, there might be an importer.

@towo
towo / osramsmartplusswitch.yaml
Last active December 9, 2022 23:33
OSRAM Smart+ Switch blueprint
blueprint:
name: OSRAM Smart+ Switch
description: Allows mapping of all the buttons of a OSRAM Smart+ Zigbee switch. (ZHA)
domain: automation
input:
device:
name: Device
description: Device entry for the switch.
selector:
device:
@towo
towo / README.md
Created February 2, 2022 09:26
Don't be inane and block boot on LVM

How to get less annoyed when trying to install a sort of sane Debian setup on a Hetzner root server.

Steps

  1. cp -R /root/.oldroot/nfs/install .
  2. patch < hetzner-debian-sanity.diff
  3. $PWD/install/installimage

Due to the nature of the scripts (i.e. dirname $0) and me being too lazy to patch them entirely, take care to use the full path when calling the copied installimage.

@towo
towo / Puppet debug
Last active December 29, 2020 17:11
Looking for a good reason why the Puppet provider decides to remove the start and stop operations.
Debug: Cs_primitive[duncan_vip](provider=pcs): {
:primitive_class=>"ocf",
:primitive_type=>"IPaddr2",
:provided_by=>"heartbeat",
:name=>:duncan_vip,
:ensure=>:present,
:provider=>:pcs,
:parameters=>{
"cidr_netmask"=>"24",
"ip"=>"172.16.210.101"},
@towo
towo / README.md
Created July 22, 2020 09:39
MQTT event notification service

Quick event notification thingie to respond to MQTT events; in my case, specifically for the doorbell so I can hear it with headphones on.

Should probably be easily adaptable to fit a more generalized need, and I'll probably do it at a later point.

@towo
towo / README.md
Last active July 9, 2020 12:43
Apt metrics systemd units for prometheus-node-exporter

Simple service and timer for the apt.sh metrics script from the Prometheus community script collection. Used on a Debianite system with the Debian repository version of node-exporter, YMMV. puppet/prometheus uses node-exporter as the group by default, can be changed by setting prometheus::node_exporter::group via hiera/resource parameter. Alternative uses with ACLs are possible; one would have to investigate if the DynamicUser overlay would work for deleting files from a directory.

@towo
towo / journal output
Created December 12, 2018 22:29
puppetlabs-corosync with debian9
Dec 12 22:26:38 debian9-64-1 systemd[1]: Starting Corosync Cluster Engine...
Dec 12 22:26:38 debian9-64-1 corosync[2812]: [MAIN ] Corosync Cluster Engine ('2.4.2'): started and ready to provide service.
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [MAIN ] Corosync Cluster Engine ('2.4.2'): started and ready to provide service.
Dec 12 22:26:39 debian9-64-1 corosync[2812]: info [MAIN ] Corosync built-in features: dbus rdma monitoring watchdog augeas systemd upstart xmlconf qdevices qnetd snmp pie relro b
indnow
Dec 12 22:26:38 debian9-64-1 corosync[2812]: [MAIN ] Corosync built-in features: dbus rdma monitoring watchdog augeas systemd upstart xmlconf qdevices qnetd snmp pie relro bindnow
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [TOTEM ] Initializing transport (UDP/IP Multicast).
Dec 12 22:26:39 debian9-64-1 corosync[2812]: notice [TOTEM ] Initializing transmit/receive security (NSS) crypto: aes256 hash: sha1
Dec 12 22:26:39 debian9-64-1 corosync[2812]: [TOTEM ] Initializing transp
@towo
towo / Gemfile.lock
Last active December 11, 2018 21:06
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet5 BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} BEAKER_destroy=no bundle exec rake beaker
GIT
remote: https://github.com/skywinder/github-changelog-generator
revision: 5d7f18bc415e9a2c27769b7ea0adb9bc18b285c0
specs:
github_changelog_generator (1.15.0.pre.rc)
activesupport
faraday-http-cache
multi_json
octokit (~> 4.6)
rainbow (>= 2.2.1)
@towo
towo / verify-ou.pl
Last active September 11, 2018 13:39
OU verification script for OpenVPN tls-verify.
#!/usr/bin/perl
## vim: set syn=on ts=4 sw=4 sts=0 et foldmethod=indent:
## purpose: check if value exists in multi-valued ou
## copyright: B1 Systems GmbH <info@b1-systems.de>, 2018.
## license: GPLv3+, http://www.gnu.org/licenses/gpl-3.0.html
## author: Tobias Wolter <tobias.wolter@b1-systems.de>, 2018.
## version: 1.0
## Source for this is the verify-cn sample from OpenVPN:
## https://github.com/OpenVPN/openvpn/blob/master/sample/sample-scripts/verify-cn
@towo
towo / gruvbox.theme
Created April 22, 2018 10:23
timewarrior gruvbox theme (needs terminal palette)
define theme:
description = "gruvbox.theme: A gruvbox-inspired theme"
colors:
exclusion = "color on color8"
today = "color208"
holiday = "color13"
label = "color243"
ids = "color4"
debug = "color14"
palette: