Skip to content

Instantly share code, notes, and snippets.

View cerebrate's full-sized avatar

Alistair Young cerebrate

View GitHub Profile
@cerebrate
cerebrate / esphome-generic.yaml
Created October 1, 2021 21:09
The start of all my ESPHome configurations.
esphome:
name: misc-generic
platform: ESP8266
board: huzzah
comment: A generic node to do generic things.
project:
name: "avatar.generic"
version: "0.1.0"
# Enable logging
@cerebrate
cerebrate / ring-mqtt.yaml
Created September 26, 2021 15:21
Ring-MQTT manifest for my Kubernetes cluster.
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ring-mqtt
name: ring-mqtt
namespace: homeassistant
spec:
replicas: 1
@cerebrate
cerebrate / mosquitto.yaml
Last active May 5, 2022 03:48
Mosquitto config for my Kubernetes cluster
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mosquitto-configmap
labels:
app.kubernetes.io/name: mosquitto
data:
mosquitto.conf: |
listener 1883
@cerebrate
cerebrate / homeassistant.yaml
Created September 26, 2021 14:43
Home Assistant Kubernetes manifest
---
apiVersion: v1
kind: Secret
metadata:
name: mysql-recorder-pass
namespace: homeassistant
type: Opaque
data:
password: <REDACTED>
---
@cerebrate
cerebrate / plant.yaml
Created July 2, 2021 19:28
STEMMA soil sensor for ESPHome
sensor:
- platform: custom
lambda: |-
auto soil_sensor = new StemmaSoilSensor();
App.register_component(soil_sensor);
return {soil_sensor->temperature_sensor, soil_sensor->moisture_sensor};
sensors:
- name: "Plant Temperature"
- name: "Plant Moisture"
@cerebrate
cerebrate / apparmor.systemd
Created May 7, 2021 16:27
Tweaked apparmor.systemd for WSL support
#!/bin/sh
# ----------------------------------------------------------------------
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@cerebrate
cerebrate / 0001-Case-hack-for-Debian-build.patch
Created May 7, 2021 01:14
Lowercase the kernel version string to work as a Debian package name
From 33890150b1898474d16d141fba7865068d1e2f7b Mon Sep 17 00:00:00 2001
From: Alistair Young <avatar@arkane-systems.net>
Date: Thu, 6 May 2021 19:41:36 -0500
Subject: [PATCH] Case hack for Debian build.
---
scripts/Makefile.package | 6 ++++--
scripts/package/builddeb | 7 ++++---
scripts/package/mkdebian | 8 +++++---
3 files changed, 13 insertions(+), 8 deletions(-)
init-+-dbus-daemon
|-init(mnt,pid,uts)-+-init---unshare(mnt)---systemd(pid)-+-atd
| | |-automount---3*[{automount}]
| | |-colord(mnt)---2*[{colord}]
| | |-cupsd---{cupsd}
| | |-daemon.start(mnt)---lxd-+-dnsmasq
| | | `-18*[{lxd}]
| | |-dbus-daemon
| | |-lxcfs(mnt)---2*[{lxcfs}]
| | |-msmtpd(mnt)
@cerebrate
cerebrate / .config
Created April 18, 2021 01:33
Kernel config file for 5.10.16.3-20210417-1-microsoft-custom-wsl2+
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.10.16.3 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 10.2.1-6) 10.2.1 20210110"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100201
CONFIG_LD_VERSION=235020000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
@cerebrate
cerebrate / ha-addon.yaml
Last active March 5, 2021 15:15
Home Assistant add-on configuration
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: node-red
namespace: homeassistant
labels:
app: node-red
spec:
replicas: 1