Skip to content

Instantly share code, notes, and snippets.

View helje5's full-sized avatar

Helge Heß helje5

View GitHub Profile
@helje5
helje5 / StateObservable.swift
Created September 16, 2023 13:16
An `Observable` property wrapper that only creates the observable value once
/**
* An Observable property wrapper that only creates the observable
* value once.
*
* Example:
* ```swift
* @Observable class Item {
* }
*
* struct MyView: View {
@helje5
helje5 / ListCellSizingFlicker.swift
Last active October 16, 2023 21:30
ListCellSizingFlicker
import SwiftUI
struct Item: Identifiable {
let id = UUID()
let title = "Hello"
}
let items = [
Item(), Item(), Item(), Item(), Item(), Item(), Item(), Item(), Item(), Item(), Item(),
Item(), Item(), Item(), Item(), Item(), Item(), Item(),
@helje5
helje5 / RustWasm.md
Last active April 7, 2024 13:38
Compile a Sum Rust Function

Install rust using rustup

brew install rustup
rustup-init
# new shell for env (or source .cargo/env), then:
rustup target add wasm32-wasi

Compile Cowsay