Skip to content

Instantly share code, notes, and snippets.

@minsOne
minsOne / SwiftAsyncTestPolling.swift
Created August 26, 2025 19:28
SwiftAsyncTestPolling.swift - AsyncStream
public struct EventuallyTimeoutError: Error, CustomStringConvertible {
public let label: String
public let message: String
public var description: String { label.isEmpty ? message : "[\(label)] \(message)" }
public init(label: String = "", message: String) {
self.label = label
self.message = message
}
}
public enum EventuallyError<T: Equatable & Sendable>:
Error,
CustomStringConvertible
{
case timeout(last: T, expected: T)
public var description: String {
switch self {
case let .timeout(last, expected):
return "Timed out. last=\(last), expected=\(expected)"
import ProjectDescription
import Foundation
func hello() -> Project {
let projFile = Path.relativeToRoot("Project.swift")
print(#function, "\(projFile.pathString)", #filePath)
print("FileManager.default.currentDirectoryPath: ", FileManager.default.currentDirectoryPath)
let basePath = URL(fileURLWithPath: "/Users/minsone/Developer/20240923/iOSApp/Project.swift")
https://github.com/ricocrescenzio95/SUITextField/blob/83c73d05b26b2e097f2ea9bd03dfb5df9dc20a05/Sources/SwiftUITextField/TextField/SUITextField.swift#L995
https://github.com/Open-Bytes/SwiftUIFormValidator/blob/29547a930990b4e4b7a6cc4919615a746d43742a/Example/FormTextField.swift#L36
https://github.com/p2p-org/p2p-wallet-ios/blob/e62fb17dae27767d6d7622a30bbe441efee5120d/p2p_wallet/Scenes/Main/Send/Input/Subviews/AmountView/SendInputAmountField.swift#L141
https://github.com/aws-samples/amazon-ivs-real-time-for-ios-demo/blob/4d87fcfe549e76469cd6234dc90e69d3f6ca6269/IVS%20Real-time/Views/Components/CustomTextField.swift#L30
https://github.com/SnowLukin/HotelMock/blob/9ef4f4ca1d953d701c75d6f5118b82bbcdeda084/HotelMock/Features/Booking/Views/PhoneTextField.swift#L13
https://github.dev/kiwicom/orbit-swiftui/blob/e3006e9452829df0951652dd5a243b8ea4253fe8/Sources/Orbit/Support/TextFields/TextView.swift#L47
https://github.com/chaltteok-studio/ChapssalKit-iOS/blob/b44051180ce26d2cea76ce3c6ccf1cb4d920d2a4/Sources/Chapssal
@minsOne
minsOne / ChoasLinesShader.metal
Created May 21, 2024 15:28 — forked from realvjy/ChoasLinesShader.metal
Choas Lines - Metal Shader
// Lines
float hash( float n ) {
return fract(sin(n)*753.5453123);
}
// Slight modification of iq's noise function.
float noise(vector_float2 x )
{
vector_float2 p = floor(x);
vector_float2 f = fract(x);
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>iOS 웹뷰 호출</title>
<style>
/* 버튼을 화면 가운데 정렬하고 적당한 크기로 설정하기 위한 CSS */
.centered {
position: absolute;
enum Parked {}
enum Driving {}
enum Gaming {}
private class EngineSystem {
static var shared = EngineSystem()
private init() {}
func start() {/**/}
func accelerate() { /* Uses gas pedal input to accelerate the real car */ }
@minsOne
minsOne / xcframework.sh
Created December 26, 2023 08:32
xcframework
set -Ceu
PACKAGE_DIR=$(
cd "$(dirname "$0")/.." || exit 1
pwd
)
cd "${PACKAGE_DIR}" || exit 1
SCHEME="MachOKit"
DERIVED_DATA_PATH=".build"
@minsOne
minsOne / links.md
Created December 20, 2023 16:06 — forked from tkersey/.2025.md
For future reference but maybe not.