Skip to content

Instantly share code, notes, and snippets.

View iccir's full-sized avatar

Ricci Adams iccir

View GitHub Profile
@iccir
iccir / NoUpdates.sh
Last active March 9, 2026 18:30
Disable macOS software update nag/badging
#!/bin/sh
#
# 1) Run this script
# 2) Reboot
# 3) System Settings -> General -> Software Update
#
# Software Update should check for updates, list available updates,
# but then remove the badge (and nags)
#
@iccir
iccir / hexdump.c
Created March 1, 2026 04:23
Yet another public domain hexdump implementation
// Pubic Domain
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
static void sLogHexDump(const void *address, const void *data, size_t size)
{
// 3 bytes per hex value + middle space + terminator
@iccir
iccir / esdumpstack.c
Last active February 24, 2026 16:49
Use EndpointSecurity to dump stack of newly launched process
/*
Use EndpointSecurity to dump stack from sp -> user_stack on all processes.
To use:
1) Compile with:
clang -arch arm64 -arch arm64e esdumpstack.c -lbsm -lEndpointSecurity -o esdumpstack
2) codesign with com.apple.developer.endpoint-security.client entitlement:
codesign -s - --entitlements esdumpstack.entitlements esdumpstack
3) Run as root:
sudo ./esdumpstack
@iccir
iccir / iWorkNag.sh
Last active February 27, 2026 21:02
Test script to disable the update nag in iWork 14.5 apps.
#!/bin/sh
# Note: ensure that iWork apps are quit before running
# These defaults will make the update nag show up on next launch
#
defaults delete com.apple.iWork.Pages TMAApplicationUpdateNotifier.MigrationAlertToInstallLastShownTimeStamp
defaults delete com.apple.iWork.Pages TMAApplicationUpdateNotifier.MigrationAlertToInstallCallCounter
defaults delete com.apple.iWork.Keynote TMAApplicationUpdateNotifier.MigrationAlertToInstallLastShownTimeStamp
@iccir
iccir / pinking.py
Created January 27, 2026 18:30
Comparison of pink noise pinking filters
#
# Compares the RBJ, PK3, and PKE pinking filters from:
# https://www.firstpr.com.au/dsp/pink-noise/
#
from scipy.signal import zpk2tf
import numpy as np
import matplotlib.pyplot as plt
import scipy.signal as signal
from scipy.signal import butter, lfilter, freqz
@iccir
iccir / Heirloom.sublime-color-scheme
Created December 16, 2025 16:43
Heirloom Color Scheme
{
"name": "Heirloom",
"author": "Ricci Adams",
"variables": {
"background": "#ffffff",
"foreground": "#000000",
},
"globals": {
@iccir
iccir / DebugFileIcon.py
Created December 10, 2025 03:38
Sublime Text command to debug blank/wrong file icons
# Given a file extension, displays information about the assigned file icon
#
# Usage:
#
# 1) Open a window in Sublime Text
# 2) View -> Show Console
# 3) Type in the following (with your extension instead of "h"):
# window.run_command("debug_file_icon, { "extension": "h" })
#
@iccir
iccir / FixedSlurpFindString.py
Last active December 8, 2025 16:14
Works around Sublime Text #6815 by manually sending selection to AppKit.
# Attempts to work around Issue #6815 by manually sending
# the selected text to the macOS Find Pasteboard
#
# https://github.com/sublimehq/sublime_text/issues/6815
from __future__ import annotations
import ctypes
import ctypes.util
import sublime
@iccir
iccir / example.service
Created September 6, 2025 17:12
systemd config for nodejs webapp
#
# Run a nodejs webapp in a systemd sandbox
#
# - Needs network I/O to localhost
# - Needs the ability to send mail via sendmail
#
[Unit]
Description=Example Service
After=network.target
@iccir
iccir / make_local_certs.sh
Last active February 9, 2025 18:58
Generate certificates for .local domains
#!/bin/sh
#
# Generate self-signed certificates for local development
# /www/keys/LocalRootCA.crt will need to be imported into Keychain Access
# and set to "Always Trust"
#
BASE_PATH="/www/keys"
ROOT_PATH="$BASE_PATH/LocalRootCA"