Skip to content

Instantly share code, notes, and snippets.

View czottmann's full-sized avatar
💭
Don't be a dick.

Carlo Zottmann czottmann

💭
Don't be a dick.
View GitHub Profile
@czottmann
czottmann / SSH_MACOS_SECURE_ENCLAVES.md
Created November 9, 2026 20:04 — forked from arianvp/SSH_MACOS_SECURE_ENCLAVES.md
Native Secure Enclaved backed ssh keys on MacOS

Native Secure Enclave backed ssh keys on MacOS

It turns out that MacOS Tahoe can generate and use secure-enclave backed SSH keys! This replaces projects like https://github.com/maxgoedjen/secretive

There is a shared library /usr/lib/ssh-keychain.dylib that traditionally has been used to add smartcard support to ssh by implementing PKCS11Provider interface. However since recently it also implements SecurityKeyProivder which supports loading keys directly from the secure enclave! SecurityKeyProvider is what is normally used to talk to FIDO2 devices (e.g. libfido2 can be used to talk to your Yubikey). However you can now use it to talk to your Secure Enclave instead!

@czottmann
czottmann / beans.md
Created March 13, 2026 13:48
rules/beans.md

Beans

When showing beans titles in a TodoWrite for your human's benefit, prefix them with their IDs.

When you start work on a bean, mark it as in-progress. This applies to epics, too.

Working on standalone (task/bug) beans

Use your work-on-bean skill.

"Compression" vs "Distillation" - Does Terminology Matter?

The Hypothesis

Would renaming the task from "compression" to "distillation" change LLM behavior, particularly around accuracy vs. brevity trade-offs?


Semantic Analysis

#!/opt/homebrew/bin/fish --login
# Prerequisites: `jq` must be installed
# Adjust the URL below with the address of your Key Light. Ask your router.
argparse \
"temperature=" "brightness=" help read \
-- $argv
or return
@czottmann
czottmann / lsremovearchives.sh
Created April 28, 2024 13:02 — forked from insidegui/lsremovearchives.sh
Remove Xcode app archives from macOS LaunchServices database
#!/bin/bash
# Recursivelly removes all apps from your Xcode archives from the LaunchServices database, preventing them from being used for widgets, launch at login, etc.
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -R -f -u $HOME/Library/Developer/Xcode/Archives
@czottmann
czottmann / caps_lock.json
Created January 4, 2024 12:30
Karabiner Elements hyper key modifications
{
"description": "caps_lock: hold for ⌃⌥⇧, tap for ⌘T",
"manipulators": [
{
"from": {
"key_code": "caps_lock",
"modifiers": {
"optional": [
"any"
]
@czottmann
czottmann / Bundle+TestFlight.swift
Created October 11, 2023 18:29 — forked from lukaskubanek/Bundle+TestFlight.swift
A code snippet for detecting the TestFlight environment for a macOS app at runtime
import Foundation
import Security
extension Bundle {
/// Returns whether the bundle was signed for TestFlight beta distribution by checking
/// the existence of a specific extension (marker OID) on the code signing certificate.
///
/// This routine is inspired by the source code from ProcInfo, the underlying library
/// of the WhatsYourSign code signature checking tool developed by Objective-See. Initially,
#!/bin/sh
set -euo pipefail
# Set the paths to your Old/New Xcodes
OLD_XCODE="/Applications/Xcode-14.3.1.app"
NEW_XCODE="/Applications/Xcode-15.0.0.app" # To get build number
# Get New Xcode build number
OLD_XCODE_BUILD=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" ${OLD_XCODE}/Contents/Info.plist)
@czottmann
czottmann / TransientAppEntity Weirdness Showcase.md
Last active August 9, 2023 09:06
A macOS 13+ `AppIntent` showcasing weird behaviour for list properties containing only a single `TransientAppEntity`

Test setup

Shortcuts app, add new workflow.

  • First action: "TransientAppEntity Weirdness Showcase"
  • Second action: "Get Items from List" with setting "First Item"

Test 1

@czottmann
czottmann / Format current file with swiftformat.scpt
Last active December 30, 2022 19:04
Xcode helper: SwiftFormat the currently focussed doc w/o losing undo history
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
-- # This script formats the currently open and focussed Swift file
-- # using SwiftFormat. It does so *without* resetting the editor's
-- # undo history.
-- #
-- # Version 2022-12-30.01
-- #
-- # Author: Carlo Zottmann