Skip to content

Instantly share code, notes, and snippets.

View cerebrate's full-sized avatar

Alistair Young cerebrate

View GitHub Profile
@cerebrate
cerebrate / Update-AUPackages.md
Created January 25, 2017 01:09
Update-AUPackages Report #powershell #chocolatey
#include <Adafruit_Sensor.h>
#include <Adafruit_BME280.h>
#include <Adafruit_TSL2561_U.h>
#include <ArduinoJson.h>
#include <ESP8266WiFi.h>
#include <Ticker.h>
#include <PubSubClient.h>
// Expose Espressif SDK functionality - wrapped in ifdef so that it still
// compiles on other platforms
@cerebrate
cerebrate / gist:c435e7680cdb4470a1925e5df197baca
Created April 11, 2017 09:25
Errors seen from npm install
In file included from ../../nan/nan.h:194:0,
from ../src/mdns.hpp:12,
from ../src/dns_sd.cpp:1:
../../nan/nan_maybe_43_inl.h: In function ‘Nan::MaybeLocal<v8::Object> Nan::CloneElementAt(v8::Local<v8::Array>, uint32_t)’:
../../nan/nan_maybe_43_inl.h:221:58: warning: ‘v8::MaybeLocal<v8::Object> v8::Array::CloneElementAt(v8::Local<v8::Context>, uint32_t)’ is deprecated (declared at /home/pi/.node-gyp/6.10.2/include/node/v8.h:3031): Cloning is not supported. [-Wdeprecated-declarations]
return array->CloneElementAt(GetCurrentContext(), index);
^
In file included from ../../nan/nan_new.h:189:0,
from ../../nan/nan.h:200,
from ../src/mdns.hpp:12,
[
{
"id": "acb5d49b.eed3f8",
"type": "ui_numeric",
"z": "9af1e491.e34a28",
"name": "",
"label": "Normal",
"group": "172d0d4f.b40b73",
"order": 5,
"width": 0,
@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
// 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 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
@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 / 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 / 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