Skip to content

Instantly share code, notes, and snippets.

View edef1c's full-sized avatar

edef edef1c

View GitHub Profile
@edef1c
edef1c / gist:e1d3dba34d04bec5f8afac6ce815aed0
Last active July 29, 2022 23:36
rustc incremental fingerprint ICE
edef@jaguar ~/s/u/s/ripple (trunk)> cargo test --workspace
Compiling minitrace v0.0.0 (/home/src/unfathomable/src/ripple/minitrace)
Compiling fossil v0.1.0 (/home/src/unfathomable/src/ripple/fossil)
error: internal compiler error: encountered incremental compilation error with def_ident_span(minitrace[a978]::{impl#69}::fmt::__BitFlags::NONBLOCK)
|
= help: This is a known issue with the compiler. Run `cargo clean -p minitrace` or `cargo clean` to allow your project to compile
= note: Please follow the instructions below to create a bug report with the provided information
= note: See <https://github.com/rust-lang/rust/issues/84970> for more information
thread 'rustc' panicked at 'Found unstable fingerprints for def_ident_span(minitrace[a978]::{impl#69}::fmt::__BitFlags::NONBLOCK): Some(minitrace/src/main.rs:574:9: 574:17 (#0))', compiler/rustc_query_system/src/query/plumbing.rs:657:9
@edef1c
edef1c / 0001-key-dumping.patch
Last active April 10, 2022 17:22
wireguard-go key dumping patch
From 4181bdea33c11bc0209f1951315107cf0fcff11a Mon Sep 17 00:00:00 2001
From: edef <edef@edef.eu>
Date: Sun, 10 Apr 2022 17:19:29 +0000
Subject: [PATCH] key dumping
Same output format as extract-keys.sh
Signed-off-by: edef <edef@edef.eu>
---
device/noise-protocol.go | 15 +++++++++++++++
@edef1c
edef1c / Makefile
Created August 17, 2021 11:59 — forked from glandium/Makefile
Linux kernel module for Zen workaround for rr
obj-m = zen_workaround.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
@edef1c
edef1c / 0001-Linux-consider-ZFS-ARC-to-be-cache.patch
Last active May 20, 2020 14:09
ZFS on Linux ARC support patch for htop (multi's revised version)
From 78ade158ed480a6958fd6d477ee90f2bd2d1f668 Mon Sep 17 00:00:00 2001
From: multiplexd <multi@in-addr.xyz>
Date: Sat, 9 May 2020 20:31:35 +0100
Subject: [PATCH v2] Linux: consider ZFS ARC to be cache
This patch adds an arcSize member to the ProcessList struct, and then
adjusts the usedMem and cachedMem values when the memory usage meter is
initialised in Platform_setMemoryValues(), and not earlier.
---
ProcessList.c | 1 +
building '/nix/store/s103zvdl4nrsi24vl0xvsjmdcphab79m-unit-nix-daemon.service.drv'...
building '/nix/store/4sni1imp36r5mj8vjgphngx2p14aqm1x-system-units.drv'...
building '/nix/store/zf3ypcls84l6pmf516krf888in81syhp-etc.drv'...
building '/nix/store/xxyk1rn73xss107wapp71nkrmdqc1kcg-nixos-system-platypus-20.03pre-git.drv'...
stopping the following units: nix-daemon.service, nix-daemon.socket
activating the configuration...
setting up /etc...
error: cannot connect to daemon at '/nix/var/nix/daemon-socket/socket': Connection refused
Activation script snippet 'nix' failed (1)
reloading user units for edef...
@edef1c
edef1c / env-necessary.pl
Last active October 20, 2019 16:29
perl script to check what environment variables a program actually needs to run
#! /usr/bin/env perl
use POSIX ":sys_wait_h";
my @untested = keys %ENV;
sub choose {
return splice @untested, rand @untested, 1;
}
sub works {
@edef1c
edef1c / ugdb-overlay.nix
Created October 18, 2019 07:21
ugdb packaged for Nix
self: super:
with self;
with rustPlatform;
{
ugdb = buildRustPackage rec {
pname = "ugdb";
version = "0.1.4";
src = fetchFromGitHub {
owner = "ftilde";
@edef1c
edef1c / nixos-option
Last active August 17, 2019 23:22
NixOS deployment scripts
nixos-rebuild
@edef1c
edef1c / sigevent.c
Last active August 13, 2019 03:42
proof-of-concept of siglongjmp/ppoll-based signal handling in an event loop
#define _GNU_SOURCE
#include <err.h>
#include <errno.h>
#include <poll.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
define-command nix-jump %{
execute-keys <esc><a-i><a-w>
edit %sh{
if [[ "$kak_selection" =~ ^\<(.*)\>$ ]]; then
path="$(nix-instantiate --find-file "${BASH_REMATCH[1]}")"
else
cd "$(dirname "$kak_buffile")"
path="$(realpath "$kak_selection")"
fi
if [ -d "$path" ]; then