Skip to content

Instantly share code, notes, and snippets.

View cerebrate's full-sized avatar

Alistair Young cerebrate

View GitHub Profile
@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 / .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
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 / 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} ---
@cerebrate
cerebrate / gist:2591e15dc4e2da0d4964b7b82f9845fc
Created July 9, 2019 05:19
LXD error starting container
# avatar @ athena in ~ [0:16:06]
$ lxc start deep-macaw
Error: Failed to run: /snap/lxd/current/bin/lxd forkstart deep-macaw /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/deep-macaw/lxc.conf:
Try `lxc info --show-log deep-macaw` for more info
[2] 8301 exit 1 lxc start deep-macaw
# avatar @ athena in ~ [0:16:15] C:1
$ lxc info --show-log deep-macaw
Name: deep-macaw
Location: none
@cerebrate
cerebrate / gist:5302c683d0676b46f1997ce8bfb17d08
Created July 3, 2019 19:30
Role adding method that fails with HttpException
[Command ("cornfield")]
[Summary ( "Banish a user to the cornfield")]
public Task InvokeBanishmentAsync ([Summary ("The user to be banished.")] SocketUser miscreant,
[Summary ("For how long are they to be banished.")]
TimeSpan period)
{
_ = Task.Run (async () =>
{
if (miscreant.IsBot)
return ;
@cerebrate
cerebrate / README.md
Last active December 2, 2023 08:17
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

WARNING

THIS GIST IS EXTREMELY OBSOLETE. DO NOT FOLLOW THESE INSTRUCTIONS. SERIOUSLY.

IF YOU IGNORE THE ABOVE WARNING, YOU AGREE IN ADVANCE THAT YOU DIDN'T GET THESE INSTRUCTIONS FROM ME, THAT I WARNED YOU, AND THAT I RESERVE THE RIGHT TO POINT AND LAUGH MOCKINGLY IF AND WHEN SOMETHING BREAKS HORRIBLY.

I'll do a write-up of current custom-kernel procedures over on Random Bytes ( https://randombytes.substack.com/ ) one day soon.

NOTE

@cerebrate
cerebrate / stargate-config
Created April 6, 2018 01:43
Cisco 881 router configuration
Current configuration : 6009 bytes
!
! Last configuration change at 20:36:49 CDT Thu Apr 5 2018 by avatar
! NVRAM config last updated at 20:30:03 CDT Thu Apr 5 2018 by avatar
!
version 15.5
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
@cerebrate
cerebrate / stargate-config
Created June 17, 2017 17:17
Router config file
version 12.4
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
service linenumber
!
hostname stargate
!
boot-start-marker