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
gcsplit logcopy.txt '/FLUTTEREXP: START/' '{*}' --prefix "run" |
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 Foundation | |
extension Data { | |
var prettyPrintedJSONString: NSString? { /// NSString gives us a nice sanitized debugDescription | |
guard let object = try? JSONSerialization.jsonObject(with: self, options: []), | |
let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]), | |
let prettyPrintedString = NSString(data: data, encoding: String.Encoding.utf8.rawValue) else { return nil } | |
return prettyPrintedString | |
} |
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
func listenForAllChildEvents(atPath path: String, completion: @escaping(_ snapshot: DataSnapshot?, _ error: Error?, _ eventType: DataEventType?) -> ()) { | |
var ref: DatabaseReference! | |
ref = Database.database().reference() | |
let itemRef = ref.root.child(path) | |
itemRef.observe(.childAdded, with: { (snapshot) in | |
completion(snapshot,nil,DataEventType.childAdded) | |
}) { (error) in | |
completion(nil,error,nil) | |
} | |
itemRef.observe(.childMoved, with: { (snapshot) in |
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 formatter = DateFormatter () | |
formatter.timeStyle = "hh mm" | |
//Instead use this: | |
var formatter = DateFormatter () | |
formatter.timeStyle = .shortStyle |
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
English | photo | |
---|---|---|
Bahasa | foto | |
French | photo | |
Russian | Фото |
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
English | picture | |
---|---|---|
Bahasa | gambar | |
French | image | |
Russian | картина |