| Char | Unicode | Unicode Name |
|---|---|---|
| = | 003D | = |
| - | 002D | - |
| + | 002B | + |
| ! | 0021 | ! |
| * | 002A | * |
| % | 0025 | % |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| extension View { | |
| /// A view modifier which triggers `action` when the iOS device is shaken or the mac catalyst window is shaken. | |
| public func onShake(perform action: @escaping () -> Void) -> some View { | |
| #if targetEnvironment(macCatalyst) | |
| self.modifier(WindowShakeModifier(action: action)) | |
| #else | |
| self.modifier(OnShakeModifier(action: action)) | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef MarchingCubesParams_h | |
| #define MarchingCubesParams_h | |
| #include <simd/simd.h> | |
| struct MarchingCubesParams { | |
| simd_uint3 cells; | |
| simd_float3 origin; | |
| simd_float3 cellSize; | |
| float isoLevel; | |
| simd_float3 centerA; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import CryptoKit | |
| import SwiftUI | |
| #if canImport(UIKit) | |
| import UIKit | |
| #elseif canImport(AppKit) | |
| import AppKit | |
| #endif | |
| public enum VisualHash { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| import Dispatch | |
| import CoreServices | |
| import Foundation | |
| import os | |
| /// An AsyncSequence which emits when a file or folder is changed. | |
| public final class DirectoryChanges: AsyncSequence { | |
| public enum Failure: Error { | |
| case InvalidFileURL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UniformTypeIdentifiers | |
| import SwiftUI | |
| import OSLog | |
| import Foundation | |
| import Observation | |
| extension Logger { | |
| public static func make(file: StaticString = #file, category: StaticString? = nil) -> Logger { | |
| Logger( | |
| subsystem: Bundle.main.bundleIdentifier ?? "some.recorder", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public import SwiftUI | |
| public struct CatchingView<Content: View, ErrorMessage: View>: View { | |
| public init( | |
| @ViewBuilder content: @escaping () throws -> Content | |
| ) where ErrorMessage == Text { | |
| self.init { | |
| Text("Any error occurred while attempting to load the content.") | |
| } content: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -e | |
| URL="$*" | |
| START=$(echo "$URL" | sed 's%/tree/main/%\n%g' | head -n1) | |
| END=$(echo "$URL" | sed 's%/tree/main/%\n%g' | tail -n1) | |
| FOLDER=$(echo "$END" | rev | cut -d'/' -f1 | rev) | |
| REPO=$(echo "$START" | cut -d'/' -f5) | |
| CHECKOUT="${REPO}_$(uuidgen)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| import Vision | |
| @available(iOS 17, *) | |
| public struct SFEdgeShape: InsettableShape { | |
| public init(systemName: String) { | |
| self.systemName = systemName | |
| } | |
| var systemName: String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # https://github.com/ggerganov/whisper.cpp | |
| CLONEDIR="${HOME}"/Developer/ | |
| stty -echoctl | |
| function ctrl_c() { | |
| 2>/dev/null "${CLONEDIR}"/whisper.cpp/main -m "${CLONEDIR}"/whisper.cpp/models/ggml-large-v3-q5_0.bin -f /tmp/rec.wav --print-colors | pbcopy |
NewerOlder