Skip to content

Instantly share code, notes, and snippets.

View qlyoung's full-sized avatar
🐈
thinking about bingus

Quentin Young qlyoung

🐈
thinking about bingus
View GitHub Profile
@qlyoung
qlyoung / wtf-canonical.md
Created January 28, 2020 07:26
wtf canonical
  • Snaps don't work if your homedir isn't /home/foo
  • Snaps don't work if your homedir is /home/foo but it's nfs
  • microk8s straight up doesn't work on zfs (canonical/microk8s#401)

what is software testing

@qlyoung
qlyoung / challenges-with-running-cpu-pinned-processes-within-docker.md
Last active October 16, 2020 09:44
Some notes on issues faced when using CPU pinning within a docker container

Challenges with running CPU pinned processes within Docker

Programs that want to bind themselves to free cores present some challenges
when run within Docker.

CPU pinning allows a program to request it be assigned exclusively to a core or set of cores This improves cache locality and other factors that become relevant for extremely CPU bound processes, especially in combination with other configurations that prevent the scheduler from assigning other processes

@qlyoung
qlyoung / setfans-auto.sh
Created December 21, 2019 01:41
set R710 fans to either manual 15% or automatic based on ipmi temperature
#!/bin/bash
# ----------------------------------------------------------------------------------
# Script for checking the temperature reported by the ambient temperature sensor,
# and if deemed too high send the raw IPMI command to enable dynamic fan control.
#
# Requires:
# ipmitool – apt-get install ipmitool
# slacktee.sh – https://github.com/course-hero/slacktee
# ----------------------------------------------------------------------------------
@qlyoung
qlyoung / test.diff
Created December 6, 2019 17:45
test gist
- hello
+ world
@qlyoung
qlyoung / hooked-getinputstate.cpp
Last active November 27, 2019 02:31
Display code for hooked ovr_GetInputState
ovrResult mygis(ovrSession session, ovrControllerType controllerType, ovrInputState* inputState)
{
ovrResult r = gis(session, controllerType, inputState);
ovrVector2f lh = inputState->Thumbstick[0];
ovrVector2f rh = inputState->Thumbstick[1];
if (controllerType == ovrControllerType_Touch) {
int resx = 500;
int resy = 500;
@qlyoung
qlyoung / frr-fuzzing.rst
Created November 18, 2019 21:09
Notes for Fuzzing FRR
  • Wherever possible, disable loading the CLI tree for massive performance gains (> 3x)
  • If running in parallel, disable pidfile checks
  • Skip option parsing
  • Disable checksums where applicable
@qlyoung
qlyoung / yang-gotchas.rst
Last active September 11, 2019 19:21
YANG & FRR Northbound gotchas

A list of some interesting edge cases in YANG and the FRR Northbound API.

leafrefs as list keys

A leafref is a reference to a leaf in another part of the data tree. Being leaves themselves, they can be used as the key for a list:

list mylist {
@qlyoung
qlyoung / frr-todo.rst
Created January 17, 2019 18:50
misc things to do in frr
  • consolidate sockopts into setsockopt.c
  • add support for ipv[4|6] pseudoheader checksum to checksum.c
@qlyoung
qlyoung / ghosts-linux-net-stack.rst
Last active November 11, 2019 19:21
Curiosities and notes on the Linux networking stack
  • Linux will send IPv4 (and probably IPv6) datagrams with no payload - just a header.
  • It is possible to bind() a socket to an address X on interface A, set the outgoing multicast interface to interface B with IP[V6]_MULTICAST_IF and then send datagrams IP sourced from X but transmitted on B (i.e. using B's MAC address).
  • The above does not work when the source address is an IPv6 link local.
@qlyoung
qlyoung / texinfo2rst.py
Last active July 16, 2020 22:20
Texinfo --> RST converter script
#!/usr/bin/python
# Retrieved from: https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01095.html
# Authored by someone at AdaCore
# Copied by Quentin Young with no modifications
# -*- coding: utf-8 -*-
"""Splits an existing .texinfo file into components suitable for
makeinfo.py
If "-node <name>" is specified, only that node and its children are
kept