Skip to content

Instantly share code, notes, and snippets.

View memchr's full-sized avatar
⛏️
n̆̆̆̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆

€šm̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰̰�Ř§Ů Â£╟©舐æØ¢£ðsÞ¥¿— memchr

⛏️
n̆̆̆̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̌̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̏̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆̆
View GitHub Profile
@memchr
memchr / git-id
Last active August 18, 2023 15:36
#!/usr/bin/bash
set -e
source $HOME/.local/lib/bash/blib.sh
load color message
colorize
msg_style=1
DATA_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/git-id"
IDENTITY_DATABASE="${DATA_DIR}/identities.json"
@memchr
memchr / import_env
Created August 28, 2023 18:43
import_env
#!/usr/bin/env bash
set -e
[[ -n $HYPRLAND_DEBUG_CONF ]] && exit 0
USAGE="\
Import environment variables
Usgae: $0 <command>
Commands:
@memchr
memchr / mkvol
Last active September 9, 2023 05:42
btrfs subvolume creation and rebuild tool
#!/usr/bin/env python
import getopt
import shutil
import array
import sys
import os
import typing
from pathlib import Path
import subprocess
@memchr
memchr / fstab.gen.py
Created December 1, 2024 12:18
fstab generator
#!/usr/bin/python3
import yaml
import sys
from pathlib import Path
HIDE_OPTIONS = ['x-gvfs-hide']
def generate_fstab(yaml_file: Path):
with yaml_file.open('r') as file:
config = yaml.safe_load(file)
@memchr
memchr / hashbench.c
Created March 28, 2025 16:25
kernel hash driver benchmark
#include <crypto/hash.h>
#include <linux/crc32c.h>
#include <linux/kernel.h>
#include <linux/ktime.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/vmalloc.h>