Skip to content

Instantly share code, notes, and snippets.

View cameroncooke's full-sized avatar

Cameron Cooke cameroncooke

View GitHub Profile
@steipete
steipete / concat.sh
Created May 17, 2025 23:32
Squashes a whole codebase into one text file, skipping build artefacts, copies it right into the clipboard.
#!/usr/bin/env bash
#
# concat.sh [root-dir] [output-file]
#
# Squashes a whole codebase into one text file, skipping build artefacts:
# • ignores node_modules, dist, .git, .turbo, .next, out
# • omits lockfiles and *.min.* noise
# • copies the result straight to the macOS clipboard (pbcopy)
#
# Example:
@available(iOS 15.0, *)
public struct RichTextEditor : SwiftUICore.View {
public init(text: SwiftUICore.Binding<Foundation.AttributedString>)
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View {
get
}
@available(iOS 15.0, *)
public typealias Body = @_opaqueReturnTypeOf("$s7SwiftUI14RichTextEditorV4bodyQrvp", 0) __
}
@available(*, unavailable)
import SwiftUI
/// Represents Apple's "Hello" greeting.
/// Requires .frame(width: 1212, height: 401) canvas to display correctly
struct HelloShape: Shape {
func path(in rect: CGRect) -> Path {
var shape = Path()
shape.move(to: CGPoint(x: 18, y: 362.78))
shape.addCurve(to: CGPoint(x: 255.5, y: 72.78), control1: CGPoint(x: 123.36, y: 301.04), control2: CGPoint(x: 240.76, y: 204.38))
@Kyle-Ye
Kyle-Ye / iPhone Mirroring.md
Last active March 20, 2025 11:27
Launch iPhone Mirroring.app on macOS 15 Beta 1
@TheCoordinator
TheCoordinator / pull-request.yml
Created October 12, 2023 14:36
SwiftLint using Ubuntu only on changed files
name: Pull Request
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- '**.md'
jobs:
swiftlint:
import Foundation
import SnapshotTesting
import XCTest
/// Returns a valid snapshot directory under the project’s `ci_scripts`.
///
/// - Parameter file: A `StaticString` representing the current test’s filename.
/// - Returns: A directory for the snapshots.
/// - Note: It makes strong assumptions about the structure of the project; namely,
/// it expects the project to consist of a single package located at the root.
Hello,
I'd like to request the following information, in accordance with the information rights in the GDPR, and particularly Article 15. Please address all points in this email in turn.
1. A copy of all my personal data held and/or undergoing processing, in a commonly used electronic form (Article 15(3)). Please note that this might also include any audiovisual material (e.g. voice-recordings or pictures) and is not necessarily limited to the information contained in your customer database and/or the information you make available through the ‘manage my profile’ functionality. For all data that would fall under Article 20 (portability), I would like to recieve this in a commonly-used machine readable format. For data that does not fall under Article 20, such as data inferred about me or opinions about me, I would like this in a commonly-used electronic format.
2. If any data was not collected, observed or inferred from me directly, precise information about the source of that data, including the name and c
@stettix
stettix / things-i-believe.md
Last active May 19, 2025 18:13
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@DavidNix
DavidNix / logNSNotifications.m
Last active December 30, 2022 10:58
Log all NSNotifications as they are fired
static void LogNSNotifications(CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,
CFDictionaryRef userInfo);
void LogNSNotifications(CFNotificationCenterRef center,
void *observer,
CFStringRef name,
const void *object,
@xareelee
xareelee / NSObject+PropertyName.h
Last active May 2, 2019 13:43
Objective-C property name to a string with autocompletion and compile-time check
// Release under MIT
// Copyright (C) 2015 Xaree Lee
#import <Foundation/Foundation.h>
/* Get property name for the class (C string or NSSting). */
#define keypathForClass(Klass, PropertyName) \
(((void)(NO && ((void)[Klass _nullObjectForCheckingPropertyName].PropertyName, NO)), # PropertyName))
#define keypathStringForClass(Klass, PropertyName) \
@keypathForClass(Klass, PropertyName)