Skip to content

Instantly share code, notes, and snippets.

Alistair Young cerebrate

Block or report user

Report or block cerebrate

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:2591e15dc4e2da0d4964b7b82f9845fc
# 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 Jul 3, 2019
Role adding method that fails with HttpException
View gist:5302c683d0676b46f1997ce8bfb17d08
[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 Aug 14, 2019
Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.
View README.md

Recompile your WSL2 kernel - support for snaps, apparmor, lxc, etc.

Yes, I've done this, and yes, it works. It is, however, entirely unsupported and assembled through reasonable guesswork, so if you try this and it explodes your computer, brain, career, relationships, or anything else, you agree that you take sole responsibility for doing it, that I never claimed it was a good idea, and that you didn't get these instructions from me .

Also note: I have done this with Debian Stretch. While one kernel ought to fit all, some of the packages you need to build it may be different. Adapting to other distros is up to you.

Step One: Install the stuff you need to build the kernel

@cerebrate
cerebrate / stargate-config
Created Apr 6, 2018
Cisco 881 router configuration
View stargate-config
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
View hyper.js
// 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
View stargate-config
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
View gist:d61be63a4dbf18448bede5cf79a66bb7
[
{
"id": "acb5d49b.eed3f8",
"type": "ui_numeric",
"z": "9af1e491.e34a28",
"name": "",
"label": "Normal",
"group": "172d0d4f.b40b73",
"order": 5,
"width": 0,
View gist:c435e7680cdb4470a1925e5df197baca
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,
View smarthermostat.ino
#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 / Update-AUPackages.md
Created Jan 25, 2017
Update-AUPackages Report #powershell #chocolatey
View Update-AUPackages.md
You can’t perform that action at this time.