Skip to content

Instantly share code, notes, and snippets.

View robbat2's full-sized avatar

Robin H. Johnson robbat2

View GitHub Profile
@robbat2
robbat2 / 000
Last active April 5, 2022 06:04
strace of Xorg
upgraded packages that could have broken it
x11-libs/pango ->1.50.4 ->1.50.6
x11-libs/motif ->2.3.8-r2 ->2.3.8-r3
x11-libs/libva ->2.13.0-r2 ->2.14.0
x11-libs/mx ->1.4.7-r2
x11-base/xwayland ->22.1.0 ->22.1.1
x11-libs/vte ->0.66.2 ->0.68.0
dev-qt/qtx11extras ->5.15.2-r1 ->5.15.3
x11-libs/libX11 ->1.7.3 ->1.7.4
@robbat2
robbat2 / aaa-bug.pl
Created November 18, 2021 06:14
perl segfault 2021/11/17
#!/usr/bin/perl -w
# The -w is required to trigger the segfault
# Copyright 2021/11/17 Robin H. Johnson <robbat2@gentoo.org>
# Public domain
my $v = undef;
my $c = undef;
my %x;
$x{$v} = '';
$x{$v} .= ' '.$c; # crash
@robbat2
robbat2 / upload-cert-ogconfig.sh
Created November 11, 2021 23:06
Wrapper to reload certificates using ogconfig-cli
#!/bin/bash
# This is a helper hack for updating the certs on the new OpenGear "Operations Manager"
# systems like OM2216.
#
# The script should be in the same directory as the key, cert & intermediate CA.
# Copyright 2020 Gentoo Authors, robbat2@gentoo.org
cd "$(dirname "$0")"
HOSTNAME=$1
DEST="root@${HOSTNAME}"
SOCK=$(mktemp -p . ssh.XXXXXXXXX.sock )
@robbat2
robbat2 / bugs.txt
Created November 10, 2021 23:43
glibc strptime ignores timezone
1. strptime isn't using the timezone specifier from "%z" to correct convert non-UTC back to UTC
2. conversion when local tz is UTC or PST to the same value suggests there might be a second bug, depending on implementation.
@robbat2
robbat2 / gist:a33182bf5f2587d1fe3ccd1caf30689d
Created August 14, 2021 23:18
ganeti 3.0.1 compile failure
https://github.com/ganeti/ganeti/blob/master/src/Ganeti/THH/Types.hs#L118
-- | Generic 'curry' that constructs a curring function of a given arity.
curryN :: Int -> Q Exp
curryN 0 = [| ($ ()) |]
curryN 1 = [| (. OneTuple) |]
curryN n = do
f <- newName "f"
ps <- replicateM n (newName "x")
return $ LamE (VarP f : map VarP ps)
From 9f8846066dd18b19dc08d7d605be899fd7e79782 Mon Sep 17 00:00:00 2001
From: "Robin H. Johnson" <robbat2@gentoo.org>
Date: Mon, 5 Jul 2021 14:34:14 -0700
Subject: [PATCH] gen_moddeps: better module detection
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
---
gen_moddeps.sh | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 5.13.0 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="x86_64-pc-linux-gnu-gcc (Gentoo Hardened 11.1.0-r1 p2) 11.1.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=110100
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23601
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by configure, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/dante-1.4.3 --htmldir=/usr/share/doc/dante-1.4.3/html --libdir=/usr/lib64 --with-socks-conf=/etc/socks/socks.conf --with-sockd-conf=/etc/socks/sockd.conf --enable-preload --enable-clientdl --enable-serverdl --enable-drt-fallback --with-libc=libc.so.6 --disable-debug --without-gssapi --with-pam --without-upnp --enable-static --without-libwrap
## --------- ##
## Platform. ##
@robbat2
robbat2 / gist:de6ec2a712969368380171b1f3b0023f
Created June 16, 2021 16:58
md5sum timing from AX51-NVME for ago
mean of time md5sum: 3.470user 0.152system 0:03.632elapsed
mean of dd output lines: 3.6348s
mean of time dd: 0.000user 0.700system 0:03.632elapsed
# for i in $(seq 1 10) ; do ( /usr/bin/time dd if=/dev/zero bs=1M count=2048 | /usr/bin/time md5sum ) 2>&1 | tee time.$(printf %03d $i) ; done ;2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 3.69002 s, 582 MB/s
0.00user 0.71system 0:03.69elapsed 19%CPU (0avgtext+0avgdata 2944maxresident)k
0inputs+0outputs (0major+344minor)pagefaults 0swaps
a981130cf2b7e09f4686dc273cf7187e -
@robbat2
robbat2 / gist:1316e6eb693a08738bdb809af770b705
Created June 14, 2021 17:44
gentoo-dev talking about R textbook for forecasting
13-20:37:56 <@robbat2> ezzieyguywuf, FreedomBear: I can 100% recommend using R via docker containers; upstream keeps them
VERY up to date
13-20:38:54 <@robbat2> open-source textbook using R to do Forecasting: https://otexts.com/fpp3/
13-20:40:56 <@robbat2> the real mental breakthrough for me was realizing that forecasting was fundamentally converting any
given series to a signal, doing signal analysis (e.g. fourier), and using that analysis to "predict"
what the next terms of a sequence would be
13-20:42:06 <@robbat2> the big win of the docker containers is full multi-threading R stuff that's hard to get otherwise
13-20:42:36 <@robbat2> i used it on a project that reliably burned all 16 cores on my Ryzen for 30 minutes wallclock per
dataset
13-20:43:42 <@robbat2> the textbook doesn't specifically cover using it via Docker, but it's a small hop only