Skip to content

Instantly share code, notes, and snippets.

import os
#include <unistd.h> // Necessary for the C.isatty function
fn main() {
// Define ANSI color codes
// mut ansi_codes := map[string]string
mut ansi_codes := {
'reset': '\x1b[0m'
'red': '\x1b[31m'
module main
/*
In-memory blob service.
PUT /path/to/file save a blob under the given path
will overwrite any previously stored blob
GET /path/to/file load a blob from the given path
@hholst80
hholst80 / ulockmgr_server.patch
Last active September 28, 2024 16:04
fuse-2.9.9 glibc patch
--- a/util/ulockmgr_server.c 2024-09-28 17:50:36.929276265 +0200
+++ b/util/ulockmgr_server.c 2024-09-28 17:51:12.812268734 +0200
@@ -124,24 +124,6 @@
return res;
}
-static int closefrom(int minfd)
-{
- DIR *dir = opendir("/proc/self/fd");
- if (dir) {
@hholst80
hholst80 / test.py
Last active October 5, 2024 17:44
async generator playground
import asyncio
from asyncio.exceptions import CancelledError
async def gen(nam="gen"):
for x in range(10):
r = range(10*x, 10*(x+1))
print(f"{nam} produced range: [{10*x},{10*(x+1)})")
yield r
await asyncio.sleep(1)
@hholst80
hholst80 / config.json
Created October 12, 2024 19:25
waybar/config
{
"layer": "top",
"position": "top",
"spacing": 0,
"height": 42,
// "hyprland/workspaces"
"modules-left": [
"custom/logo",
"river/tags",
],