- Zero dependencies
- Zero heap allocations
- Unrolled and inlineable
- Sensibly debuggable using line-oriented breakpoints
- Buffer-oriented functions usable in embedded and kernel development
- Optional 128-bit integer support where
__int128
andunsigned __int128
are available
I would learn C and x86/arm assembly first enough to bootstrap.
It's usually good to learn how to write ld linker scripts and how to make something bootable from grub.
Then, I would look Rust because it's easier to create correct no_std kernels.
arm architecture and instruction (ISA) reference
This file contains 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 bash | |
# Needed for btrfs support on RH/Fedora-derived platforms | |
set -Eeuo pipefail | |
files=(containerd containerd-shim-runc-v2 ctr docker dockerd docker-init docker-proxy runc) | |
url_prefix="https://download.docker.com/linux/static/stable/$(/bin/arch)/" | |
ua='Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36' | |
tarball=$(/bin/curl -fsSL -A "$ua" "$url_prefix" | /bin/grep -Eo 'docker-[0-9.]+tgz' | /bin/sort -Vur | /bin/head -1) | |
url="${url_prefix}${tarball}" |
This file contains 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 bash | |
# | |
# | |
# _______ _____ ______ _______ _______ _______ _____ _______ | |
# |______ | | ____ |______ |_____| | | | |_____] | |______ | |
# | __|__ |_____| ______| | | | | | | |_____ |______ | |
# | |
# | |
# ___ ___ ___ | |
# |
This file contains 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
CFLAGS ?= -std=c99 -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wpedantic -Wformat=2 -flto -O3 -DNEBUG | |
build: find-crc32-worker | |
find-crc32-worker: find-crc32-worker.c Makefile | |
$(CC) $(CFLAGS) -lz $< -o $@ | |
clean: | |
rm -f find-crc32-worker |
This file contains 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 bash | |
set -euo pipefail | |
# This script supports openssh 8.2+ | |
(( ! UID )) || exec /usr/bin/sudo "$0" "$@" | |
var=${0//[^a-zA-Z0-9_]/_} | |
eval [ "\${$var-}" ] || exec /usr/bin/env ${var}=1 /usr/bin/flock -en "$0" "$0" "$@" | |
bits=${1:-4096} | |
min_bits=$((bits - 1)) | |
moduli::generate() { |
This file contains 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
(HOST1={{hostname1}} HOST2={{hostname2}}; diff -u <(ssh "$HOST1" 'sed "/CONFIG_/!d;s/^# //" /boot/config-$(uname -r) | sort') <(ssh "$HOST2" 'sed "/CONFIG_/!d;s/^# //" /boot/config-$(uname -r) | sort')) |
This file contains 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
#ifndef LIBC_BITS_H | |
#define LIBC_BITS_H | |
#include <assert.h> | |
#include <ctype.h> | |
#include <errno.h> | |
#include <float.h> | |
#include <limits.h> | |
#include <locale.h> | |
#include <math.h> |
brew edit node@18
- Insert
ENV["CXXFLAGS"] = "-Wno-enum-constexpr-conversion"
afterENV["PYTHON"] = ...
brew install node@18
- Profit!
Notes:
- i. Don't bother reporting this to homebrew because it has severely unprofessional contributors.
- ii. Clang/LLVM people insist on breaking all software and systems for idealological purity.
- iii. Node people refuse to take ownership of this.
! CRITICAL PROBLEM ! Currently broken because ...../airport -z
no longer functions and the replacement is uncertain and nonexistent for now
- Add
local.auto-switch-wifi-ethernet.zsh
to/usr/local/sbin
- Add
local.auto-switch-wifi-ethernet.plist
to/Library/LaunchDaemons
- Create
/usr/local/.home.wifi.ssid
containing the Wi-Fi network name (SSID) to try to connect to when Ethernet is no longer internet reachable - Start it permanently
sudo launchctl unload -w /Library/LaunchDaemons/local.auto-switch-wifi-ethernet.plist
NewerOlder