Skip to content

Instantly share code, notes, and snippets.

import SwiftUI
struct ContentView: View {
let items = [0, 1, 2, 3, 4]
@State private var position = ScrollPosition(idType: Int.self)
@State private var showPage: Bool = true
let height = 300.0
let width = 300.0
import SwiftUI
#if canImport(UIKit)
import UIKit
public typealias PlatformImage = UIImage
#elseif canImport(AppKit)
import AppKit
public typealias PlatformImage = NSImage
#endif
@cameronmcefee
cameronmcefee / ExampleCallsite.swift
Last active December 29, 2025 23:22
Some Claude generated test helpers for snapshotting query index usage and efficiency metrics. Don't bother arguing with me about it, it's not a hill I'm interested in dying on. It's a handy way to keep track of regressions and it's taught me some details about what goes on under the hood.
@Test("MasonryGalleryItemsQuery - folder")
func masonryFolder() async throws {
let ids = try await setupTestData(in: database)
try await database.read { db in
let query = MasonryGalleryItemsQuery(galleryType: .folder(ids.folderID), limit: 100).makeQuery()
try assertInlineSnapshot(of: getQueryIndexes(query, in: db), as: .description) {
"""
feedFolders: idx_feedFolders_folderID_feedID
feeds: sqlite_autoindex_Feeds_1