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
@insidegui
insidegui / lsremovearchives.sh
Created December 21, 2021 18:28
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
@hmans
hmans / og_images.tmpl.tsx
Created November 12, 2022 14:46
Automatic OpenGraph Images for Lume
import { render } from "https://deno.land/x/[email protected]/mod.ts";
import { Page, PageData } from "lume/core.ts";
import satori, { SatoriOptions } from "npm:satori";
/* We never want our beautiful PNGs to have a layout :-) */
export const layout = undefined;
/* Load fonts. We can't use variable fonts unfortunately. */
const inter = await Deno.readFile("./src/fonts/Inter-Regular.ttf");
const interBold = await Deno.readFile("./src/fonts/Inter-Bold.ttf");
@palashmon
palashmon / Prettify.ts
Created May 13, 2023 16:11
A super useful type helper in TypeScript by Matt Pocock from Twitter
/**
* A TypeScript type alias called `Prettify`.
* It takes a type as its argument and returns a new type that has the same properties as the original type,
* but the properties are not intersected. This means that the new type is easier to read and understand.
*/
type Prettify<T> = {
[K in keyof T]: T[K];
} & {};
@harrisonrw
harrisonrw / IDETemplateMacros.plist
Created December 2, 2024 19:56
Custom Xcode File Header
<?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>FILEHEADER</key>
<string>
// ___FILENAME___
// ___PROJECTNAME___
//
// Copyright © 2024 RWH Technology, LLC. All rights reserved.
@macshome
macshome / Usernames.swift
Last active June 2, 2025 13:55
A playground to understand how to find the current username on macOS.
// Some Swift code for different ways to find the current username on macOS.
//
// You can run this in a Playground, or compile it with `swiftc`. Compiling
// it will let you experiment with different ways of running the command.
print("********** Foundation Usernames **********")
// If you are only importing Foundation you have a few options to get the current user.
// Note that if run from the CLI they will report the CLI user running them.
import Foundation
@steipete
steipete / swift-testing-playbook.md
Last active January 15, 2026 11:54
The Ultimate Swift Testing Playbook (feed it your agents for better tests!)

The Ultimate Swift Testing Playbook (2024 WWDC Edition, expanded with Apple docs from June 2025)

Updated with info from https://developer.apple.com/documentation/testing fetched via Firecrawl on June 7, 2025.

See also my blog: See also my blog post: https://steipete.me/posts/2025/migrating-700-tests-to-swift-testing

A hands-on, comprehensive guide for migrating from XCTest to Swift Testing and mastering the new framework. This playbook integrates the latest patterns and best practices from WWDC 2024 and official Apple documentation to make your tests more powerful, expressive, and maintainable.


1. Migration & Tooling Baseline

@steipete
steipete / gemini.md
Created June 29, 2025 09:38
gemini.md to teach Claude to use google's gemini cli as his tool

Using Gemini CLI for Large Codebase Analysis

When analyzing large codebases or multiple files that might exceed context limits, use the Gemini CLI with its massive context window. Use gemini -p to leverage Google Gemini's large context capacity.

File and Directory Inclusion Syntax

Use the @ syntax to include files and directories in your Gemini prompts. The paths should be relative to WHERE you run the gemini command:

Examples: