I’ve had success using Homebrew in a multi-user environment the following way:
Create a new (non-GUI) user, group and home directory:
sudo /usr/sbin/sysadminctl -addUser brew \
-fullName 'Homebrew' -admin -home /var/brew \
-password - -UID 430 \
| public protocol DynamicProperties: AnyObject { | |
| subscript<T>(dynamic key: String) -> T? { get set } | |
| } | |
| private extension String { | |
| var unsafePointer: UnsafeRawPointer { | |
| return UnsafeRawPointer(bitPattern: hashValue)! | |
| } | |
| } | |
| extension DynamicProperties { |
| import Observation | |
| public protocol _Observable: Observable { | |
| nonisolated | |
| func _access<Member>(keyPath: KeyPath<Self, Member>) | |
| nonisolated | |
| func _withMutation<Member, MutationResult>( | |
| keyPath: KeyPath<Self, Member>, | |
| _ mutation: () throws -> MutationResult |
| #!/bin/zsh | |
| # Test if the Swift compiler knows about a particular language feature. | |
| # | |
| # Usage: | |
| # | |
| # swift-has-feature [--swift SWIFT_PATH] [--language-version LANGUAGE_VERSION] FEATURE | |
| # | |
| # The feature should be an upcoming or experimental language feature, | |
| # such as `"StrictConcurrency"` or `"ExistentialAny"`. |
| import Foundation | |
| import CryptoKit | |
| import AuthenticationServices | |
| import UIKit | |
| struct SignInWithAppleResult { | |
| let token: String | |
| let nonce: String | |
| } |
| import SwiftUI | |
| import Combine | |
| struct ContentView: View { | |
| @State var items: [Int] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
| var body: some View { | |
| List { | |
| ForEach(items, id: \.self) { item in | |
| Text("Item: \(item)") |
| // | |
| // ContentView.swift | |
| // WeirdSheet | |
| // | |
| // Created by lotusirous on 28/11/2022. | |
| // | |
| import SwiftUI | |
| protocol Nameable { |
The Composable Architecture (TCA, pour faire court) est une bibliothèque permettant de construire des applications de manière cohérente et compréhensible, en tenant compte de la composition, des tests et de l'ergonomie. Elle peut être utilisée avec SwiftUI, UIKit, et encore, et sur toutes les plateformes Apple (iOS, ma
| import UIKit | |
| import SwiftUI | |
| // Credits to: https://www.avanderlee.com/swiftui/integrating-swiftui-with-uikit/ | |
| extension UIViewController { | |
| /// Add a SwiftUI `View` as a child of the input `UIView`. | |
| /// - Parameters: | |
| /// - swiftUIView: The SwiftUI `View` to add as a child. |
| import CloudKit | |
| import Combine | |
| /// Fetches the user's CloudKit Account status. | |
| /// | |
| /// - Parameter container: The container to check the status in. | |
| /// | |
| /// - Returns: A deferred future that resolves to the user's CloudKit Account status. | |
| func getAccountStatus(for container: CKContainer) -> AnyPublisher<CKAccountStatus, Error> { | |
| Deferred { |