Skip to content

Instantly share code, notes, and snippets.

View mischief's full-sized avatar
🐡
hack the planet

Nick Owens mischief

🐡
hack the planet
View GitHub Profile
@mischief
mischief / notes.md
Created February 13, 2026 07:17
notes for lua on openbsd

cqueues does not really like libressl, so

env ALL_LDFLAGS="$(pkg-config --libs eopenssl36) -Wl,-rpath=/usr/local/lib/eopenssl36" \
   luarocks install --local --force cqueues OPENSSL_INCDIR=/usr/local/include/eopenssl36/

to force openssl from packages. cqueues goofy makefile doesn't look at LDFLAGS.

for added fun, http rock

env ALL_LDFLAGS="$(pkg-config --libs eopenssl36) -Wl,-rpath=/usr/local/lib/eopenssl36" \

@mischief
mischief / vmd.patch
Created February 6, 2026 04:14
fix vmd 'invalid fault_type 2'
diff --git a/usr.sbin/vmd/vm.c b/usr.sbin/vmd/vm.c
index 6d571ce90fc..141ecdb80a7 100644
--- a/usr.sbin/vmd/vm.c
+++ b/usr.sbin/vmd/vm.c
@@ -42,8 +42,6 @@
#include "virtio.h"
#include "vmd.h"
-#define MMIO_NOTYET 0
-
@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