Skip to content

Instantly share code, notes, and snippets.

View cerebrate's full-sized avatar

Alistair Young cerebrate

View GitHub Profile
@cerebrate
cerebrate / notepad.strace
Created September 3, 2019 23:44
Unshare and notepad straces
8443 execve("/mnt/c/Windows/notepad.exe", ["/mnt/c/Windows/notepad.exe"], 0x7ffe76c97718 /* 14 vars */) = 0
8443 arch_prctl(ARCH_SET_FS, 0x29b7e0) = 0
8443 set_tid_address(0x29b818) = 8443
8443 brk(NULL) = 0x1480000
8443 brk(0x1481000) = 0x1481000
8443 sched_getaffinity(0, 128, [0, 1, 2, 3]) = 32
8443 getpid() = 8443
8443 getcwd("/home/avatar", 4096) = 13
8443 uname({sysname="Linux", nodename="athena-wsl", ...}) = 0
8443 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0xfffffffffffffff9} ---
The M-1066-7h.2 'Wondergun'
A frightening personal weapon for 'Traveller'
The Star Kingdom Of Kirov (See Library Data) has a long-standing reputation for dubious products.
This was surpassed with the M-1066-7 Wondergun. Ironically, as well as being arguably the worst
personal weapon to have ever attained mass production anywhere, it is also the Kingdom's greatest
single commercial success.
In 1101, the monarch of Kirov established a committee to design and develop "...the most advanced
and versatile personal weapon system ever built by man..." - with a view towards re-equipping Kirov's
@cerebrate
cerebrate / .config
Created February 22, 2021 01:20
WSL kernel config for 5.4.91-20210221-3-microsoft-custom-wsl2+
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.4.91 Kernel Configuration
#
#
# Compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100201
@cerebrate
cerebrate / ha-base.yaml
Last active March 5, 2021 14:54
Home Assistant configuration
---
apiVersion: v1
kind: Namespace
metadata:
name: homeassistant
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
@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
@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
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 / 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(-)
@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 / 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"