Skip to content

Instantly share code, notes, and snippets.

@thillsman
thillsman / notes-seed.json
Last active March 8, 2026 14:01
StatusReport project notes
{}
@thillsman
thillsman / status.json
Last active March 8, 2026 13:46
StatusReport project status data
{
"lastUpdated": "2026-03-08T12:00:00Z",
"projects": [
{
"id": "stickies",
"name": "Sticky Widgets",
"bundleId": "com.tylerhillsman.Stickies",
"appStoreId": "1533254320",
"githubRepo": "thillsman/Stickies",
"status": "active",
@thillsman
thillsman / mstdn-link.php
Last active August 10, 2023 15:55
mstdn.link logic
public extension UIFont {
static func loadGothamNarrow(ofSize size: CGFloat, weight: UIFont.Weight) -> UIFont {
let name: String = {
switch weight {
case .bold, .black, .heavy, .semibold:
return "GothamNarrow-Bold"
default:
return "GothamNarrow-Book"
}
@thillsman
thillsman / CombineBackport.swift
Last active April 13, 2020 17:42
Combine backport
import Foundation
@propertyWrapper
struct Published<Value> {
var projectedValue: Published { self }
var wrappedValue: Value { didSet { valueDidChange() } }
private var observations = MutableReference(
value: List<(Value) -> Void>()
)
@thillsman
thillsman / morphColor.swift
Created November 5, 2016 19:37
Morph from one UIColor to another
extension UIColor {
// First extend UIColor to make it easier to get components out
var coreImageColor: CIColor {
return CIColor(color: self)
}
var components: (red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat) {
let color = coreImageColor
return (color.red, color.green, color.blue, color.alpha)
}