I hereby claim:
- I am jegge on github.
- I am jegge (https://keybase.io/jegge) on keybase.
- I have a public key ASBlEFRs-Gw_0MYWU5Q_TAufkKsaIoIgMJKIcew84OTZRwo
To claim this, I am signing this object:
| extension NSAttributedString { | |
| convenience init? (html: String) { | |
| let options = [NSAttributedString.DocumentReadingOptionKey.documentType: NSAttributedString.DocumentType.html] | |
| guard | |
| let data = html.data(using: .utf16, allowLossyConversion: true), | |
| let text = try? NSMutableAttributedString(data: data, options: options, documentAttributes: nil) | |
| else { | |
| return nil | |
| } |
| import UIKit | |
| extension Collection where Element == String { | |
| func bulletize(indentation: CGFloat, font: UIFont, color: UIColor) -> NSAttributedString { | |
| let style = NSMutableParagraphStyle() | |
| style.defaultTabInterval = indentation | |
| style.firstLineHeadIndent = 0 | |
| style.lineSpacing = 0 | |
| style.paragraphSpacing = 15 | |
| style.headIndent = indentation |
| extension UserDefaults { | |
| func set<T>(encodable object: T, forKey key: String) where T: Encodable { | |
| if let data = try? JSONEncoder().encode(object) { | |
| set(data, forKey: key) | |
| } | |
| } | |
| func decodable<T>(forKey key: String) -> T? where T: Decodable { | |
| if let data = data(forKey: key) { | |
| return try? JSONDecoder().decode(T.self, from: data) |
| // | |
| // TextReader.swift | |
| // | |
| // Created by Sebastian Boettcher on 05.09.19. | |
| // Copyright © 2019 Sebastian Boettcher. All rights reserved. | |
| // | |
| import Foundation | |
| private func isReadable (fileHandle: FileHandle) -> Bool { |
| // | |
| // DirectoryWatcher.swift | |
| // | |
| // Created by Sebastian Boettcher on 16.07.17. | |
| // Copyright © 2017 Sebastian Boettcher. All rights reserved. | |
| // | |
| // License: MIT | |
| // | |
| import Foundation |
| "Test_a" = "AAAAA"; | |
| "Test_b" = "BBBBB"; | |
| "Test_c" = "CCCCC"; | |
| "Test_d" = "DDDDD"; |
I hereby claim:
To claim this, I am signing this object: