TODO: Write a project description
TODO: Describe the installation process
# from https://libbits.wordpress.com/2011/04/09/get-total-rsync-progress-using-python/ | |
import subprocess | |
import re | |
import sys | |
print('Dry run:') | |
cmd = 'rsync -az --stats --dry-run ' + sys.argv[1] + ' ' + sys.argv[2] | |
proc = subprocess.Popen(cmd, | |
shell=True, |
Unfortunately, xcode does not yet have support for importing OSX crash logs and symbolizing them. Therefore, you must use the command line and a little bit of manual work.
extension UIImage { | |
class func imageWithColor(color: UIColor, size: CGSize=CGSize(width: 1, height: 1)) -> UIImage { | |
UIGraphicsBeginImageContextWithOptions(size, false, 0) | |
color.setFill() | |
UIRectFill(CGRect(origin: CGPoint.zero, size: size)) | |
let image = UIGraphicsGetImageFromCurrentImageContext() | |
UIGraphicsEndImageContext() | |
return image | |
} | |
} |
public struct ISOString { | |
/// Parse ISO 6709 string. | |
/// e.g. "+34.0595-118.4460+091.541/" | |
/// SeeAlso: [ISO 6709](https://en.wikipedia.org/wiki/ISO_6709) | |
public static func parse(iso6709 text: String?) -> CLLocation? { | |
guard | |
let results = text?.capture(pattern: "([+-][0-9.]+)([+-][0-9.]+)"), | |
let latitude = results[safe: 1] as NSString?, | |
let longitude = results[safe: 2] as NSString? | |
else { return nil } |