Skip to content

Instantly share code, notes, and snippets.

@hoyhoy
hoyhoy / http_parse_fuzz.cpp
Last active November 9, 2026 00:41
http_parse_fuzz.cpp
// Fuzzer for Apple CarPlay Communication Plug-in -- HTTPParseRTPInfo()
// Implementation possibly here -- https://github.com/45clouds/WirelessCarPlay/blob/master/source/AccessorySDK/Support/HTTPUtils.c
// Modified from https://github.com/dawgyg/AppleResearch/blob/main/fuzzers/opack/http_parse_fuzz.c
#include <cstdint>
#include <cstddef>
#include <cstring>
#include <vector>
#include <CoreFoundation/CoreFoundation.h>
@hoyhoy
hoyhoy / lsa.c
Last active October 10, 2026 18:20
strtok claptrap
#include <unistd.h>
const long arg_max = sysconf(_SC_ARG_MAX);
char *savedptr = NULL;
token = strtok_r(line, " \t\n", &savedptr);
while(token != NULL && argc < arg_max) {
args[argc++] = token;
token = strtok_r(NULL, " \t\n", &savedptr);
}
@hoyhoy
hoyhoy / vault-agent.plist
Last active August 14, 2026 16:45
Vault Agent Plist ~/Library/LaunchAgents/com.hashicorp.vault-agent.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-/Apple/DTD PLIST 1.0/EN" "http:/www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.hashicorp.vault-agent</string>
<key>KeepAlive</key>
<true/>
<key>LaunchOnlyOnce</key>
<true/>
@hoyhoy
hoyhoy / agent.hcl
Created August 14, 2026 16:42
Vault Agent Configuration
vault {
address = "https://127.0.0.1:8200"
}
auto_auth {
method "token_file" {
config = {
token_file_path = "/opt/vault/etc/vault-token"
}
}
@hoyhoy
hoyhoy / deploy-dotfiles.sh
Last active August 14, 2026 16:12
What I use instead of Gnu Stow ...
display_banner() {
if [ "${SUPPRESS_BANNER:-}" == "yes" ] || [[ -z "${TERM:-}" ]]; then
return
fi
# Get terminal width
local banner_length=$(($(tput cols)))
# Set minimum banner length
if (( banner_length < 40 )); then
@hoyhoy
hoyhoy / ssh_config
Last active July 12, 2026 17:42
SSH Port Forwarding Claptraps for Ruined
Host rhel10-z15
Hostname xxxxxxxx # rhel10 on a z15 (s/390) if you even care
User hoyhoy
ServerAliveInterval 15
# VM running the VPN
ProxyJump jumpbox.local
IdentitiesOnly yes
@hoyhoy
hoyhoy / memoized_cache.cpp
Last active July 11, 2026 18:40
Memoized Cache
#include <cerrno> // Provides ENOENT
#include <mutex>
#include <shared_mutex>
#include <string>
#include <unordered_map>
namespace CodingExamples {
class Cache {
private:
@hoyhoy
hoyhoy / .clang-tidy
Last active June 25, 2026 16:37
.clang-tidy
Checks: '*,
-altera*,
-boost-use-ranges,
-bugprone-easily-swappable-parameters,
-bugprone-reserved-identifier,
-cert-dcl03-c,
-cert-dcl37-c,
-cert-dcl51-cpp,
-cert-err34-c,
-clang-analyzer-security.ArrayBound,
@hoyhoy
hoyhoy / config.jsonc
Last active April 30, 2026 22:44
~/.config/fastfetch/config.jsonc
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"padding": {
"top": 1
}
},
"display": {
"separator": " 󰑃 "
},
@hoyhoy
hoyhoy / flake.nix
Created March 23, 2026 21:10
Nix-darwin Flake for Conan Build
{
description = "Meson nix-darwin system flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
# home-manager = {
# url = "github:nix-community/home-manager/nixpkgs-unstable";