Skip to content

Instantly share code, notes, and snippets.

View iccir's full-sized avatar

Ricci Adams iccir

View GitHub Profile
@iccir
iccir / setup_firefox.sh
Created September 9, 2026 02:51
Firefox Enterprise Policies
defaults write org.mozilla.firefox EnterprisePoliciesEnabled -bool true
defaults write org.mozilla.firefox ManualAppUpdateOnly -bool true
defaults write org.mozilla.firefox DefaultBrowserSettingEnabled -bool false
defaults write org.mozilla.firefox DisableFirefoxStudies -bool true
defaults write org.mozilla.firefox OverrideFirstRunPage -string ""
defaults write org.mozilla.firefox OverridePostUpdatePage -string ""
defaults write org.mozilla.firefox SkipTermsOfUse -bool true
@iccir
iccir / appicon.m
Last active August 26, 2026 12:17
Generate app icon templates for macOS
/*
Generate images that replicate the shape and shadow of
a macOS app icon.
Writes results to '/tmp/macos_*.png'
Public Domain
*/
@iccir
iccir / check_repos.py
Created May 23, 2026 18:39
Check settings of all GitHub repositories
#!/usr/bin/env python3
"""
check_repos.py
This is a tool to check the GitHub settings of all of my repositories.
- "Wiki", "Projects", "Discussions", and "Pull Requests" should be disabled.
- "Issues" should be enabled for select repositories.
- Watch should be set to "All Activity" when Issues are enabled.
@iccir
iccir / FixSafariLag.md
Last active April 12, 2026 19:13
Prevent lag in Safari when Console is streaming

If Console is streaming log messages, typing a URL in Safari's location field will often lag before showing results. This is due to the UnifiedFieldCompletionListGenerator class sending thousands of logging messages via os_log_info().

To fix this, create a plist with the following content:

<?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">
@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 July 6, 2026 14:20
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": {