Skip to content

Instantly share code, notes, and snippets.

Static Site + Blog Infrastructure Plan

Astro + MDX · rsync deploy · Linode · Cloudflare DNS

This document defines a boring, sane, long-lived infrastructure for a content-driven website and blog.

The guiding principle is simple:

Build locally. Inspect everything. Deploy files. Serve static content.

@brentsimmons
brentsimmons / NSMenuItem+RSCore.swift
Created January 6, 2026 04:11
Disable all menu item images in a Mac app.
//
// NSMenuItem+RSCore.swift
// RSCore
//
// Created by Brent Simmons on 1/5/26.
//
#if os(macOS)
import AppKit
import ObjectiveC
@19h
19h / apfs-dcopy.c
Last active January 19, 2026 12:40
Robust, ditto-like deduplicating recursive copy for macOS/APFS
// ============================================================================
// dcopy — Robust, APFS-aware, ditto-like recursive copy for macOS
// ============================================================================
//
// dcopy is a robust, mission-grade copy/clone engine for macOS/APFS. It marries
// fast, low-syscall enumeration with parallel hashing and IO, opportunistic APFS
// clone paths, sparse-aware streaming, and multi-strategy deduplication. It
// prioritizes crash safety (temp-file + fsync + atomic rename), correctness, and
// predictable performance on very large trees.
//
@pilotmoon
pilotmoon / PopRichString+Markdown.m
Created January 21, 2023 17:41
Add formatting to NSAttributedString initilalized from Markdown
//
// PopRichString+Markdown.m
// Pop
//
// Created by Nicholas Moore on 29/11/2022.
//
#import "PopRichString+Markdown.h"
#import "NMKit.h"
@zhuowei
zhuowei / safariinject.m
Last active January 2, 2026 10:19
Restores old tab bar in Safari 15.0 (16612.1.29.41.4, 16612)
// Restores old tab bar in Safari 15.0 (16612.1.29.41.4, 16612)
// clang -fmodules -shared -Wall -Os -o libsafariinject.dylib safariinject.m
//
// If SIP off:
// DYLD_INSERT_LIBRARIES=$PWD/libsafariinject.dylib /Applications/Safari.app/Contents/MacOS/Safari
//
// If SIP on, you can demo this by manually removing Safari's code signing signature, but many
// features (eg saved logins) won't be readable by the resigned app:
// cp -a /Applications/Safari.app ./
// codesign --remove Safari.app/Contents/MacOS/Safari
//
// TCObject.m
//
//
// Created by Karsten Kusche on 19.12.20.
// Copyright © 2020 briksoftware.com. All rights reserved.
//
//
// compile with -fno-objc-arc
//
@Omar-Ikram
Omar-Ikram / EndpointSecurityDemo.m
Last active November 16, 2025 16:12
A demo of using Apple's EndpointSecurity framework - tested on macOS Monterey 12.2.1 (21D62)
//
// main.m
// EndpointSecurityDemo
//
// Created by Omar Ikram on 17/06/2019 - macOS Catalina 10.15 Beta 1 (19A471t)
// Updated by Omar Ikram on 15/08/2019 - macOS Catalina 10.15 Beta 5 (19A526h)
// Updated by Omar Ikram on 01/12/2019 - macOS Catalina 10.15 (19A583)
// Updated by Omar Ikram on 31/01/2021 - macOS Big Sur 11.1 (20C69)
// Updated by Omar Ikram on 07/05/2021 - macOS Big Sur 11.3.1 (20E241)
// Updated by Omar Ikram on 04/07/2021 - macOS Monterey 12 Beta 2 (21A5268h)
@depth42
depth42 / MEUnarchiver.h
Last active August 29, 2015 14:17
Attempt at implementing a replacement for NSUnarchiver which is not available under iOS. This can be handy for reading legacy file-formats on iOS devices. It does not provide all features of NSUnarchiver but the basic stuff is there. Has been moved to https://github.com/depth42/MEUnarchiver
Has been moved to https://github.com/depth42/MEUnarchiver