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 | |
| # Benchmark tar --reflink extraction against a regular one. | |
| # | |
| # usage: bench.sh <workdir-on-target-fs> <archive>... | |
| # | |
| # Each archive is extracted RUNS times (default 3) in both modes, at | |
| # cold cache when possible, timing tar plus the sync of the extracted | |
| # data; the best run is reported. Contents and extent sharing are | |
| # verified once per archive. | |
| # |
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
| /* clone_bench - measure the per-file cost of FICLONERANGE on many | |
| small files, compared to a plain copy. | |
| Creates NFILES files of SIZE bytes each, in the current directory, | |
| from a common source file, in one of three ways: | |
| write plain write(2) of the whole content | |
| clone-trunc FICLONERANGE of size rounded up to 4k, then | |
| ftruncate to the real size (what a program cloning | |
| a non-block-aligned range out of a larger file, |
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", |
NewerOlder