Skip to content

Instantly share code, notes, and snippets.

View drbawb's full-sized avatar

Robbie Straw drbawb

View GitHub Profile
@drbawb
drbawb / route.rs
Last active August 29, 2015 14:13
fn-ptr not `Clone` workaround
#[derive(Clone)]
pub struct Expression {
names: Vec<String>,
regex: Regex,
}
pub type Handler = fn(req: &Request, env: &mut Env) -> Result<String,String>;
pub struct Route {
matcher: Expression,
@drbawb
drbawb / config
Last active December 8, 2018 16:35
sway output switching crash
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
alleluia=# select * from tags; │···
id | name | description | created_at | updated_at │···
----+-------------------+-------------+----------------------------+---------------------------- │···
1 | trailers | | 2015-03-21 00:50:51.892679 | 2015-03-21 00:50:51.892679 │···
2 | birds | | 2015-03-21 00:51:39.282225 | 2015-03-21 00:51:39.282225 │···
3 | mostly just birds |
0eNrtnVtvZcdxRv+KwGfR2H3v1kvgGxzBTgLYSgLDMIyZESMTloYDinKiGPPfQw7PhcOp2vtbfXjgPPjJ1tiz1GdXdfWlvq7628Xrb3+4end7/fbuT69vbv5y8cXfjn/y/cUXf3jyjw//2/Wbm7ePf/z99TdvX3378Gd3P767uvji4vru6ruLzy/evvru4Z9ub17fvLu5vbt4//nF9duvr/7n4ovw/vPNv/bNq7urJ38lvv/j5xdXb++u766vHv+1H/7hxz+9/eG711e398zD3/z+7vbV9Td/vru8/49v74Hvbr6//1s3bx/+Vfektnx+8ePFF5ch5PcP43jGiTKnrnISH0+0OJmPx+QUPp7F4lQ+HpPT8HiWbnE6Ho/NGSrnsh8GVC1QWGRSy+sk7tMOiDu1Azp69cPfv3zz51fXby93M9n4UuEnZc/LPykmMU98d3PChTLx3W1S/fhXur+vxY9/3+cXX1/fXr15/L9ki9w0cu3bH65z57B/7eDOYUfORftxrcGvFsOni8mnxghL3FPNgBPjhKeZoTSmCU+zSVn5ZWXjhxUFssGoAiP3dcZESLe/ykRMt0FD+FVj/Velo1e/+eH2r1dfu04THjmjfezRxYKGCV+0hxcnfNEmJfGHtmT/UGvqpqxB6wAfj29lnF9ctcG1Bn5w475rD65jFxnmxiYN7CE2KC/0uzucQD+Rw4lsM5L2y84oz1edYOETN4C5acqZTqy07WeZ73ac0VX0Fdvif8Vk4RvB1wpthDdBzkcYMBIIFioLdnNzbCWQL9gGs08Bu6K9H8WPsc3CJo7Nwmjz5PljJHsXXQqf5Obmt1Q+H21Q00GL/eWsRbN0jo3bE7DIi0utuvfUBVMF56loIh2PYJ7v1IiDj2nxmnCgsDnyUboDx6kFUwW/qfp06fsfvQiO0zg2Cp4zsRczDyR1Yi9mgpp+yVS7/UMtY7cwuxkIymLTIh/1su1MTZ5ANeu+1DKmCq7U8OHFcQB8D+tw5BnTI/CjPrln0dxo4DE
From cd326356f6589596c204b3543482926a078e6213 Mon Sep 17 00:00:00 2001
From: Robert Straw <drbawb@fatalsyntax.com>
Date: Sat, 15 May 2021 13:46:18 -0500
Subject: [PATCH] PCI: Disable NVMe controller if a shutdown was requested.
When a PCIe FLR is performed, if the function is an NVMe storage device,
any pending shutdown notifications must be properly handled before the
FLR can be issued. This is particularly important if the Linux kernel was
not in charge of the NVMe drive's last configuration. (e.g: the device was
being used by the vfio-pci driver and a KVM guest.)
@drbawb
drbawb / logs.txt
Created April 15, 2024 19:22
systemd-networkd dhcp
-- system wakes from suspend --
Apr 15 13:23:17 KAISEI systemd-networkd[80608]: enp5s0: Flags change: -LOWER_UP
Apr 15 13:23:17 KAISEI systemd-networkd[80608]: Sent message type=signal sender=n/a destination=n/a path=/org/freedesktop/network1/link/_36 interface=org.freedesktop.DBus.Properties member=PropertiesChanged cookie=138 reply_cookie=0 signature=sa{sv}as error-name=n/a error-message=n/a
Apr 15 13:23:17 KAISEI systemd-networkd[80608]: lan1: DHCPv4 client: EXPIRED
Apr 15 13:23:17 KAISEI systemd-networkd[80608]: lan1: DHCP lease lost
Apr 15 13:23:17 KAISEI systemd-networkd[80608]: lan1: Removing DHCPv4 route (configured): dst: 10.42.0.1/32, src: n/a, gw: n/a, prefsrc: 10.42.1.136, scope: link, table: 1, proto: dhcp, type: unicast, nexthop: 0, priority: 1024, flags: n/a
Apr 15 13:23:17 KAISEI systemd-networkd[80608]: lan1: Removing DHCPv4 route (configured): dst: n/a, src: n/a, gw: 10.42.0.1, prefsrc: 10.42.1.136, scope: global, table: 1, proto: dhcp, type: unicast, nexthop: 0, priority: 1024, flags: n/a
A