- Web Wormhole https://webwormhole.io/ https://github.com/saljam/webwormhole
- ToffeeShare https://toffeeshare.com/
- FilePizza https://file.pizza/
ShareDrop sharedrop.io https://github.com/szimek/sharedrop(SOLD, not recommended, use one of the forks)A clone SnapDrop snapdrop.net https://github.com/RobinLinus/snapdrop(SOLD, not recommended, use one of the forks)- A fork PairDrop https://pairdrop.net/ https://github.com/schlagmichdoch/pairdrop
- Instant.io https://instant.io/
- FileTC https://file.tc/
This file contains 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
protocol ImmutableCopy { | |
associatedtype InitializerTuple | |
var lastInitParams: AnyInitializerParams<InitializerTuple> { get } | |
func copy(from: (InitializerTuple) -> Self, applying: (inout InitializerTuple) -> Void) -> Self | |
} | |
extension ImmutableCopy { | |
func copy(from: (InitializerTuple) -> Self, applying: (inout InitializerTuple) -> Void) -> Self { | |
var values = lastInitParams.values | |
applying(&values) |
This file contains 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 UICollectionViewFlowLayout { | |
typealias DelegateMethod<Key, Value> = ((UICollectionView, UICollectionViewLayout, Key) -> Value) | |
private var delegate: UICollectionViewDelegateFlowLayout? { | |
return collectionView?.delegate as? UICollectionViewDelegateFlowLayout | |
} | |
func retrieve<Key, Value>( |
This file contains 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 FirebaseFirestore | |
private struct Property { | |
let label: String | |
let value: Any | |
} | |
struct FirestoreModelData { | |
let snapshot: DocumentSnapshot |
This file contains 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 String { | |
var localized: String { | |
return NSLocalizedString(self, comment: "\(self)_comment") | |
} | |
func localized(_ args: [CVarArg]) -> String { | |
return localized(args) | |
} | |
This file contains 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 Encodable { | |
func encode(with encoder: JSONEncoder = JSONEncoder()) throws -> Data { | |
return try encoder.encode(self) | |
} | |
} | |
extension Decodable { | |
static func decode(with decoder: JSONDecoder = JSONDecoder(), from data: Data) throws -> Self { | |
return try decoder.decode(Self.self, from: data) | |
} |
This file contains 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 UIVisualEffectView { | |
private var filterLayer: CALayer? { | |
return layer.sublayers?.first | |
} | |
private var blurFilter: NSObject? { | |
return filterLayer? | |
.filters?.flatMap({ $0 as? NSObject }) | |
.first(where: { $0.value(forKey: "name") as? String == "gaussianBlur" }) |
This file contains 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
/// This is a list of Hypertext Transfer Protocol (HTTP) response status codes. | |
/// It includes codes from IETF internet standards, other IETF RFCs, other specifications, and some additional commonly used codes. | |
/// The first digit of the status code specifies one of five classes of response; an HTTP client must recognise these five classes at a minimum. | |
enum HTTPStatusCode: Int, Error { | |
/// The response class representation of status codes, these get grouped by their first digit. | |
enum ResponseType { | |
/// - informational: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line. | |
case informational |
This file contains 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
var isValidEmail: Bool { | |
do { | |
let regex = try NSRegularExpression(pattern: "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}", options: .caseInsensitive) | |
return (regex.firstMatch(in: self, options: [], range: NSMakeRange(0, self.characters.count)) != nil) | |
} catch { | |
debugPrint(error.localizedDescription) | |
return false | |
} | |
} |
This file contains 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
/// Retries the given throwing `block` as a promise `tries` times, | |
/// re-calling `block` another time until exhausting the tries. | |
func retry<T>(tries count: Int, block: () throws -> T) -> Promise<T> { | |
return Promise().thenRetry(tries: count, block: block) | |
} | |
/// Retries the given promise-returning `block` as a promise `tries` times, | |
/// re-calling `block` another time until exhausting the tries. | |
func retry<T>(tries count: Int, block: () -> Promise<T>) -> Promise<T> { | |
return Promise().thenRetry(tries: count, block: block) |
NewerOlder