Skip to content

Instantly share code, notes, and snippets.

@mischief
mischief / cgofuse.diff
Created January 22, 2026 16:04
rclone hacking for openbsd
diff --git a/fuse/host_cgo.go b/fuse/host_cgo.go
index b957917..682d239 100644
--- a/fuse/host_cgo.go
+++ b/fuse/host_cgo.go
@@ -190,7 +190,7 @@ static void *cgofuse_init_fuse(void)
#elif defined(__NetBSD__)
h = dlopen("librefuse.so.2", RTLD_NOW);
#elif defined(__OpenBSD__)
- h = dlopen("libfuse.so.2.0", RTLD_NOW);
+ h = dlopen("libfuse.so", RTLD_NOW);
#include <sys/param.h> /* MIN */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stddef.h>
#include <errno.h>
#include <assert.h>
@mischief
mischief / os.txt
Created June 16, 2025 08:15
megrez notes
sifive p550 ubuntu works on megrez mostly
https://github.com/sifiveinc/hifive-premier-p550-ubuntu/releases/tag/2025.04.00
- missing wifi fw
- audio driver seems broken, untested
@mischief
mischief / ffs2.lua
Created June 4, 2025 21:57
scan for ffs2 slices
local ffi = require("ffi")
local io = require("io")
local bit = require("bit")
ffi.cdef[[
typedef unsigned char u_char;
typedef unsigned char u_int8_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
@mischief
mischief / imsg.lua
Last active May 3, 2025 22:36
luajit imsg
local ffi = require("ffi")
local unix = require("unix")
ffi.cdef [[
typedef uint32_t pid_t;
struct msgbuf;
struct imsgbuf {
struct msgbuf *w;
@mischief
mischief / npppd.conf
Created April 18, 2025 16:40
test npppd.conf
authentication LOCAL type local {
users-file "/etc/npppd/npppd-users"
}
tunnel PPPOE protocol pppoe {
mru 1400
listen on interface rge3
}
ipcp IPCP {
@mischief
mischief / hwmond.c
Created September 16, 2024 04:34
hwmon
#include <err.h>
#include <fcntl.h>
#include <limits.h>
#include <signal.h>
#include <stddef.h>
#include <string.h>
#include <sysexits.h>
#include <unistd.h>
#include <stdlib.h>
@mischief
mischief / hello.txt
Created October 26, 2023 22:41
hello world
hello
@mischief
mischief / epaper.yaml
Created July 5, 2023 05:05
epaper esphome config
esphome:
name: epaper
friendly_name: epaper
esp8266:
board: d1_mini
# Enable logging
logger:
@mischief
mischief / main.cpp
Created July 5, 2023 05:02
epaper code GxEPD2
#include <Arduino.h>
#include <GxEPD2_3C.h>
#include <Fonts/FreeMonoBold9pt7b.h>
GxEPD2_3C<GxEPD2_290_Z13c, GxEPD2_290_Z13c::HEIGHT> pdisplay(GxEPD2_290_Z13c(/*CS=D8*/ D8, /*DC=D3*/ D0, /*RST=D4*/ D1, /*BUSY=D2*/ D2)); // GDEH029Z13 128x296, UC8151D
const char HelloWorld[] = "Hello World!";
void setup() {
Serial.begin(115200);