Skip to content

Instantly share code, notes, and snippets.

Avatar

Alistair Young cerebrate

View GitHub Profile
@cerebrate
cerebrate / apparmor_wsl.patch
Last active Nov 8, 2021
Better patch for apparmor under WSL
View apparmor_wsl.patch
--- rc.apparmor.functions 2021-11-08 13:27:06.461249682 -0600
+++ rc.apparmor.functions 2021-11-08 13:30:05.766141212 -0600
@@ -68,7 +68,7 @@
# something like `systemd-detect-virt --container`.
#
# The only known container environments capable of supporting internal policy
-# are LXD and LXC environment.
+# are LXD and LXC environments and Windows Subsystem for Linux.
#
# Returns 0 if the container environment is capable of having its own internal
@cerebrate
cerebrate / .config
Created Oct 14, 2021
Kernel config for my custom WSL kernel 5.10.60.1
View .config
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.10.60.1 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 11.2.0-9) 11.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110200
CONFIG_LD_VERSION=236010000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
@cerebrate
cerebrate / automations.yaml
Created Oct 6, 2021
The silliest thing I have yet programmed my smart home to do.
View automations.yaml
- id: '1633409486743'
alias: 'Snapshot: called when front door snapshot updates'
description: ''
trigger:
- platform: state
entity_id: camera.front_door_snapshot
attribute: timestamp
condition: []
action:
- service: image_processing.scan
@cerebrate
cerebrate / base.yaml
Created Oct 1, 2021
Non-device specific ESPHome package
View base.yaml
# Common features for all our device nodes.
# Enable logging
logger:
# Enable wireless networking
wifi:
ssid: "Arkane Systems"
password: "<REDACTED>"
fast_connect: true
@cerebrate
cerebrate / esp8266-huzzah.yaml
Created Oct 1, 2021
Device-specific package for the ESP8266 HUZZAH
View esp8266-huzzah.yaml
# Common features for all Adafruit Feather ESP8266 HUZZAH device nodes.
esphome:
name: ${deviceName}
platform: ESP8266
board: huzzah
comment: ${description}
project:
name: "avatar.${deviceName}"
version: "${version}"
@cerebrate
cerebrate / env-office.yaml
Created Oct 1, 2021
Super-basic environmental sensor node for ESPHome.
View env-office.yaml
substitutions:
deviceName: env-office
deviceFriendlyName: Office Environment Sensor
description: Environment sensor for my office
version: 1.0.0
packages:
device: !include packages/esp8266-huzzah.yaml
base: !include packages/base.yaml
@cerebrate
cerebrate / esphome-generic.yaml
Created Oct 1, 2021
The start of all my ESPHome configurations.
View esphome-generic.yaml
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 Sep 26, 2021
Ring-MQTT manifest for my Kubernetes cluster.
View ring-mqtt.yaml
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: ring-mqtt
name: ring-mqtt
namespace: homeassistant
spec:
replicas: 1
@cerebrate
cerebrate / mosquitto.yaml
Last active Sep 26, 2021
Mosquitto config for my Kubernetes cluster
View mosquitto.yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: mosquitto-configmap
labels:
app.kubernetes.io/name: mosquitto
data:
mosquitto.conf: |
listener 1883
@cerebrate
cerebrate / homeassistant.yaml
Created Sep 26, 2021
Home Assistant Kubernetes manifest
View homeassistant.yaml
---
apiVersion: v1
kind: Secret
metadata:
name: mysql-recorder-pass
namespace: homeassistant
type: Opaque
data:
password: <REDACTED>
---