This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """Convert SVG files to a single multi-page PDF using headless Chrome.""" | |
| import glob | |
| import os | |
| import re | |
| import subprocess | |
| import sys | |
| import tempfile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Copyright (C) 2026 Matteo Croce <matteo@teknoraver.net> | |
| * | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| * | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| mkdir -p sign/preload | |
| git clone -b eic7x-dt-fix-megrez https://github.com/ganboing/u-boot-eic7x.git u-boot | |
| cd u-boot | |
| make eic7700_milkv_megrez_defconfig | |
| make -j4 | |
| cd - |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # Find the maximum I/O size for a single read/write syscall | |
| # Uses binary search after detecting the approximate limit by doubling | |
| # | |
| # Works on Linux, BSD, and other POSIX systems | |
| set -eu | |
| # Start with 1 MB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #include <unistd.h> | |
| void allocate_memory(size_t gb) | |
| { | |
| size_t bytes = gb * 1024 * 1024 * 1024ULL; | |
| size_t pgsize = sysconf(_SC_PAGESIZE); | |
| unsigned char *ptr = malloc(bytes); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use std::env; | |
| use std::fs; | |
| use std::io::{self, Read, Write}; | |
| use std::os::unix::fs::PermissionsExt; | |
| use std::os::unix::net::{UnixListener, UnixStream}; | |
| use std::path::Path; | |
| use std::sync::atomic::{AtomicBool, Ordering}; | |
| use std::sync::Arc; | |
| use std::thread; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "net" | |
| "os" | |
| "os/signal" | |
| "sync" | |
| "syscall" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import subprocess | |
| import sys | |
| cmds = [ | |
| "BPFMapCreate", "BPFMapLookupElem", "BPFMapUpdateElem", "BPFMapDeleteElem", | |
| "BPFMapGetNextKey", "BPFProgLoad", "BPFObjPin", "BPFObjGet", | |
| "BPFProgAttach", "BPFProgDetach", "BPFProgTestRun", "BPFProgGetNextId", | |
| "BPFMapGetNextId", "BPFProgGetFdById", "BPFMapGetFdById", | |
| "BPFObjGetInfoByFd", "BPFProgQuery", "BPFRawTracepointOpen", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* run as: | |
| * gcc -O2 -Wall bpffs.c -o bpffs | |
| * sudo strace -f -e fsopen,fsconfig,fspick,fsmount,move_mount,unshare ./bpffs | |
| */ | |
| #define _GNU_SOURCE | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* run as: | |
| * gcc -O2 -Wall bpf_token.c -o bpf_token -lbpf | |
| * sudo strace -f -e fsopen,fsconfig,fspick,fsmount,move_mount,unshare,bpf ./bpf_token | |
| */ | |
| #define _GNU_SOURCE | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> |
NewerOlder