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 Calendar { | |
| func generateDates( | |
| inside interval: DateInterval, | |
| matching components: DateComponents | |
| ) -> [Date] { | |
| var dates: [Date] = [] | |
| dates.append(interval.start) |
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
| // | |
| // NSPersistentContainer+extension.swift | |
| // CDMoveDemo | |
| // | |
| // Created by Tom Harrington on 5/12/20. | |
| // Copyright © 2020 Atomic Bird LLC. All rights reserved. | |
| // | |
| import Foundation | |
| import CoreData |
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 sh | |
| { # Ensure all script is loaded | |
| # | |
| # Backup unifi or protect configuration files to a remote server | |
| # You should install first the public key remotely. | |
| # | |
| # To do ssh authentication if you have a Cloud Key Gen2, it is like any other | |
| # debian. Just use "ssh-keygen" and "ssh-copy-id" | |
| # |
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 UIImage { | |
| @available(iOS 15, *) | |
| var thumbnail: UIImage? { | |
| get async { | |
| let size = CGSize(width: 80, height: 40) | |
| return await self.byPreparingThumbnail(ofSize: size) | |
| } | |
| } | |
| } | |
| enum FetchError:Error{ |
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
| // | |
| // ThreadSafe.swift | |
| // GDICore | |
| // | |
| // Created by Grant Davis on 1/2/21. | |
| // Updated to support `_modify` accessor on 12/5/21. | |
| // | |
| // Copyright © 2021 Grant Davis Interactive, LLC. All rights reserved. | |
| // | |
| import Foundation |
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
| /// The authentication state. | |
| enum AuthenticationState: StateType { | |
| // A list of events. | |
| enum Event { | |
| case userSignIn(email: String, password: String) | |
| case accessTokenReceived(AccessToken) | |
| case userReceived(User) | |
| case userSignedOut | |
| } |
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 _Concurrency | |
| import Combine | |
| import Dispatch | |
| import Foundation | |
| // MARK: General | |
| struct SomeError: Error {} | |
| extension AnyPublisher { |
OlderNewer