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
// Created by Oleg H. on 5/17/18. | |
// Copyright © 2018 Oleg H. All rights reserved. | |
// | |
import XCTest | |
let count = 150000 | |
/* | |
Plust operator is faster. |
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 Data { | |
// NSString gives a nice sanitized debugDescription | |
var prettyPrintedJSONString: NSString? { | |
guard let object = try? JSONSerialization.jsonObject(with: self, options: []) else { | |
print("Cannot serialize JSON object.") | |
return nil | |
} | |
guard let data = try? JSONSerialization.data(withJSONObject: object, options: [.prettyPrinted]) else { |
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
git log --since="00:00" --author="Oleg Gnidets" --all |
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 tinted(withColor color: UIColor) -> UIImage { | |
guard let maskImage = cgImage else { | |
return self | |
} | |
let bounds = CGRect(origin: .zero, size: size) | |
let renderer = UIGraphicsImageRenderer(size: size) | |
return renderer.image { context in | |
let cgContext = context.cgContext |
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
{ | |
"Simulator Target Bundle": "com.app.bundleid", | |
"aps": { | |
"alert": { | |
"title": "Push on the simulator \ue057", | |
"subtitle": "So cool notification", | |
"body": "This notification is going to show up in the simulator!" | |
} | |
} | |
} |
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
for git_tag in $(git tag -l | grep Testing/v2.0.0); do git tag --delete $git_tag; git push --delete origin $git_tag; done |