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 | |
| public class Promise<T> { | |
| public private(set) lazy var future: Future<T> = Future() | |
| public init() { /**/ } | |
| public func fulfill(_ value: T) { | |
| future.result = .success(value) |
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
| ~/.gitconfig | |
| [user] | |
| name = Personal Name | |
| email = personal@email.com | |
| [includeif "gitdir:~/Projects/Company/"] | |
| path = Projects/Company/gitconfig-company |
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
| extension Locale { | |
| var flagEmoji: String? { | |
| let base: UInt32 = 127397 | |
| return countryCode? | |
| .unicodeScalars | |
| .compactMap { Unicode.Scalar(base + $0.value) } | |
| .reduce("", { $0.appending(String($1)) } ) | |
| } | |
| } |
OlderNewer