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 Compression | |
| /// A convenience class for compressing an NSData object. | |
| /// | |
| /// Example: | |
| /// ``` | |
| /// let compression = Compression(algorithm: .ZLIB) | |
| /// let compressedData = compression.compressData(data) | |
| /// let decompressedData = compresison.decompressData(compressedData) |
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
| # Xcode | |
| .DS_Store | |
| */build/* | |
| *.pbxuser | |
| !default.pbxuser | |
| *.mode1v3 | |
| !default.mode1v3 | |
| *.mode2v3 | |
| !default.mode2v3 | |
| *.perspectivev3 |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>FILEHEADER</key> | |
| <string> | |
| // ___COPYRIGHT___ | |
| //</string> | |
| </dict> | |
| </plist> |
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 | |
| private class Nothing: Decodable { } | |
| func decodeArray<T, U: Decodable>(_ container: KeyedDecodingContainer<T>, forKey key: T) throws -> [U] { | |
| var unkeyedContainer = try container.nestedUnkeyedContainer(forKey: key) | |
| var objects: [U] = [] | |
| while !unkeyedContainer.isAtEnd { | |
| do { | |
| let object = try unkeyedContainer.decode(U.self) |
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
| whitelist_rules: # only these rules will be applied | |
| - line_length | |
| - file_length | |
| - function_body_length | |
| - type_body_length | |
| - type_name | |
| - identifier_name | |
| - class_delegate_protocol | |
| - weak_delegate | |
| - anyobject_protocol |
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 Cocoa | |
| enum Animal { | |
| case aardvark(NSWindow.StyleMask) | |
| case bear | |
| case cat | |
| } | |
| func isNotCat(_ animal: Animal) -> Bool { | |
| switch animal { |
OlderNewer