Skip to content

Instantly share code, notes, and snippets.

Talos Cluster Certificate Expiration and Renewal

Problem Description

The user encountered an issue where they could no longer connect to their Talos cluster due to expired certificates. This manifested in two ways:

  1. Unable to use kubectl:
    kubectl get nodes
    

E1006 19:24:27.025594 1695958 memcache.go:265] "Unhandled Error" err="couldn't get current server API group list: the server has asked for the client to provide credentials"

McIntosh C2500 Integration with ESPHome and Home Assistant

The gubbins and configuration files for integrating a McIntosh C2500 amplifier (it should work with all rs232 McIntosh's) with Home Assistant using ESPHome.

ESPHome YAML (mcintosh.yaml)

# Filename: mcintosh.yaml

substitutions:
package main
import (
"bytes"
"encoding/binary"
"encoding/json"
"flag"
"fmt"
"io/ioutil"
"os"
substitutions:
device_name: "saw-clamp"
friendly_name: "Saw AMP Clamp"
timezone: "Europe/London"
main_icon: "saw"
esphome:
name: ${device_name}
platform: ESP8266
board: d1_mini
@daemonp
daemonp / chromium-app-open.sh
Last active December 5, 2023 11:15
Bash script to open slack and superhuman as chrome "shortcuts" in dedicated windows
#!/bin/bash
# Function to open an app if not already open
open_app() {
local app_id="$1"
local profile_dir="$2"
swaymsg -t get_tree | rg "$app_id-$profile_dir" > /dev/null || \
chromium --app-id="$app_id" --profile-directory="$profile_dir"
}
@daemonp
daemonp / cert-manager-webhook-deployment-patch.yaml
Created October 21, 2023 16:26
Kutsomize patch to enable AdditionalCertificateOutputFormats
apiVersion: apps/v1
kind: Deployment
metadata:
name: cert-manager-webhook
namespace: kube-system
spec:
template:
spec:
containers:
- name: cert-manager-webhook
// Alec Jacobson http://www.alecjacobson.com/weblog/?p=3816
// clang -Wall -g -O3 -ObjC -framework Foundation -framework AppKit -o impbcopy impbcopy.m
#import <Foundation/Foundation.h>
#import <Cocoa/Cocoa.h>
#import <unistd.h>
BOOL copy_to_clipboard(NSString *path)
{
// http://stackoverflow.com/questions/2681630/how-to-read-png-image-to-nsimage
NSImage * image;
substitutions:
device_name: mcintosh
friendly_name: "McIntosh C2500"
timezone: "Europe/London"
main_icon: "amp"
activity_threshold: "5" # Threshold (number) that the device will change from `Idle` to `Active` if power is greater than or equal to
esphome:
name: ${device_name}
platform: ESP8266
#!/bin/sh
# monitor asound status changes and trigger mqtt events
SND_STATUS="/proc/asound/card1/pcm0p/sub0/status"
MQTT_TOPIC="shellies/shelly1-xxxxx/relay/0/command"
MQTT_HOST="mqtt.home"
while true ; do
value=`cat $SND_STATUS | egrep 'state|closed'`
# Roon manifest for k8s
---
apiVersion: v1
kind: Service
metadata:
labels:
app: roon
name: roon
namespace: home
annotations: