Skip to content

Instantly share code, notes, and snippets.

View cerebrate's full-sized avatar

Alistair Young cerebrate

View GitHub Profile
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: homeassistant
name: homeassistant
namespace: homeassistant
spec:
replicas: 1
@cerebrate
cerebrate / Dockerfile
Created July 16, 2022 13:18
Home Assistant MySQL fix
FROM homeassistant/home-assistant:2022.7.5
RUN apk add --no-cache mariadb-connector-c
FROM archlinux:base-devel
LABEL org.opencontainers.image.authors="avatar@arkane-systems.net"
RUN pacman -Syu --noconfirm pacman-contrib git
# makepkg user and workdir
ARG pkguser=makepkg
RUN useradd --system --create-home $pkguser \
&& echo "$pkguser ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$pkguser
@cerebrate
cerebrate / kernel-config
Last active February 10, 2022 15:40
Kernel config for my custom WSL kernel 5.10.93.2
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.10.93.2 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (Debian 11.2.0-16) 11.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110200
CONFIG_LD_VERSION=237900000
CONFIG_CLANG_VERSION=0
CONFIG_LLD_VERSION=0
@cerebrate
cerebrate / apparmor_wsl.patch
Last active October 25, 2022 23:42
Better patch for apparmor under WSL
--- 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 October 14, 2021 15:32
Kernel config for my custom WSL kernel 5.10.60.1
#
# 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 October 6, 2021 22:43
The silliest thing I have yet programmed my smart home to do.
- 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 October 1, 2021 22:52
Non-device specific ESPHome package
# 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 October 1, 2021 22:46
Device-specific package for the ESP8266 HUZZAH
# 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 October 1, 2021 22:37
Super-basic environmental sensor node for ESPHome.
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