Skip to content

Instantly share code, notes, and snippets.

View obrhoff's full-sized avatar

Dennis Oberhoff obrhoff

View GitHub Profile
@obrhoff
obrhoff / gist:3952871dc5d7eb48b92d98994e09f81a
Created February 10, 2025 17:26
Sourcery Template for OpenAPI Schema Type Alias and Identifiable Extension
import SwiftUI
{% for type in types.all %}
{% if not type.name|hasSuffix:"CodingKeys" %}
{% if type.parentName == "Components.Schemas" %}
public typealias {{ type.localName }} = Components.Schemas.{{ type.localName }}
{% endif %}
{% endif %}
{% endfor %}
import Foundation
// MARK: - CurrentValueStream
public final class CurrentValueStream<T>: AsyncSequence, @unchecked Sendable {
public typealias Element = T
private var _value: T
private var unfair_lock: os_unfair_lock_s = .init()
private var continuations: [UUID: AsyncStream<T>.Continuation] = [:]
@obrhoff
obrhoff / gist:fd619d5526dbb3ef5211aebd2a5ce23f
Created July 6, 2024 17:15
Build Opus Audio Codec for iOS
#!/bin/bash
VERSION="1.5.2"
SDKVERSION="17.0"
MINIOSVERSION="10.0"
###########################################################################
#
# Don't change anything under this line!
#