Skip to content

Instantly share code, notes, and snippets.

View brennanMKE's full-sized avatar

Brennan Stehling brennanMKE

View GitHub Profile
@brennanMKE
brennanMKE / README.MD
Last active July 14, 2025 19:37
Proposal: Enhancing Social Media Interactions with Content Creators Through Contextual Linking and Open APIs

Proposal: Enhancing Social Media Interactions with Content Creators Through Contextual Linking and Open APIs

User Story Jane is scrolling through her favorite social media app when she sees a post from a trusted journalist discussing a breaking news story. Intrigued, she taps the link and lands on the journalist’s blog. At the bottom of the article, she notices a dynamic summary showing the volume and nature of the ongoing discussion across social media, with her platform—Bluesky—automatically highlighted. She's able to return to the original thread seamlessly, where she contributes to the discussion better informed than before. This flow not only enriches Jane’s understanding but also drives authentic engagement with both the article and the online community.

Overview This proposal outlines a standardized framework to improve the interactions between social media platforms and content creators, including news organizations and independent bloggers. By appending contextual metadata to shared lin

@brennanMKE
brennanMKE / README.md
Created June 11, 2025 04:49
Using UIWindowScene and UIWindow with SwiftUI to Create a Debugging Window

Using UIWindowScene and UIWindow with SwiftUI to Create a Debugging Window

This tutorial explains the relationship between UIWindowScene, UIWindow, and UIScene, and shows how to create a secondary debug window using SwiftUI inside a UIKit-hosted UIWindow. This is especially useful for developers working on internal tools or debugging overlays for iOS, iPadOS, or visionOS apps.


Overview

Apple's scene-based lifecycle (introduced in iOS 13) allows multiple UI scenes per app. Each scene is an instance of UIScene, and for UIKit-based apps, it takes the form of a UIWindowScene. Each UIWindowScene can own multiple UIWindow instances.

@brennanMKE
brennanMKE / README.md
Created May 30, 2025 21:44
Swift Errors vs Exceptions

🧠 Distinction: Thrown Errors (Swift) vs Exceptions (Other Languages)

✅ Swift: Thrown Errors

  • Swift’s throw/try/catch is designed for predictable, recoverable errors.

  • Swift requires explicit syntax:

    • func foo() throws
    • try foo()
  • do { try foo() } catch { ... }

@brennanMKE
brennanMKE / DebuggingLeaksWithLLDB.md
Last active May 27, 2025 18:25
Debugging with LLDB

✅ Debugging Memory Leaks with LLDB

🔍 1. Inspect What Is at a Given Memory Address

Yes — if you have a memory address from a leak report, LLDB can tell you what object it points to:

memory read --format x --size 8 --count 1 0xADDRESS
@brennanMKE
brennanMKE / AccessModel.md
Last active May 9, 2025 19:18
Sponsor Access Standard

🔧 Sponsor Access Protocol – Revised Access Model

✅ Overview

Each sponsor token grants access rights based on a defined access type, including:

Access Type Description
timed Fixed expiration (e.g., 7 days from claim)
day_pass Each use activates 24-hour access; multiple passes can be held
@brennanMKE
brennanMKE / README.md
Created April 5, 2025 08:13
Swift Study Notes

✅ Swift 6 Study Notes — any, some, Existentials, Boxing, Dispatch

(via ChatGPT)

🧱 any vs some — Existential vs Opaque Types

any Protocol

  • Existential type: Can hold a value of any type that conforms to the protocol.
  • Requires heap allocation (boxing).
  • Uses dynamic dispatch via a witness table.
@brennanMKE
brennanMKE / README.md
Created April 4, 2025 20:26
Tailscale and WireGuard

Tailscale and WireGuard

(via ChatGPT)

🔧 Overview: Platform Features Supporting WireGuard & Tailscale

Modern OSes like macOS, Linux, Windows, and iOS have built-in support for networking features that make tools like WireGuard and Tailscale work smoothly:

💡 Core Platform Features Used

| Feature | Description | Used By |

@brennanMKE
brennanMKE / README.md
Created March 28, 2025 22:47
Swift with sending parameter

What sending enforces

Using sending tells the compiler:

  • This value will be consumed by a concurrent context (e.g., a task).
  • It must not be accessed again from the current task.
  • If it is accessed again (e.g., reused or mutated), the compiler will raise an error.

In the code below, it enforces running the operation once. Using it in the 2nd Task causes a compiler error.

@brennanMKE
brennanMKE / README.md
Created March 26, 2025 16:51
Getting Started with Tailscale

🛠 Getting Started with Tailscale: A Practical Guide

(via ChatGPT)

✨ Overview

This guide will help you set up Tailscale to:

  • Connect multiple Macs at home
  • Remotely manage Raspberry Pis in other networks
@brennanMKE
brennanMKE / FizzBuzz.swift
Last active March 9, 2025 03:44
FizzBuzz with Swift
import Foundation
let fizzValue = "Fizz"
let buzzValue = "Buzz"
let fizzBuzzValue = "FizzBuzz"
let emptyValue = ""
enum FizzBuzz: String {
case fizz = "Fizz"
case buzz = "Buzz"