Skip to content

Instantly share code, notes, and snippets.

let record = CKRecord(recordType: "MyType", recordID: recordID)
record["title"] = "name" as CKRecordValue?
record["price"]= 1 as CKRecordValue?
@sgr-ksmt
sgr-ksmt / acknowledgement_generator.swift
Created November 16, 2016 10:30
licenses plist generator: support CocoaPods/Carthage
#!/usr/bin/env xcrun --sdk macosx swift
import Foundation
let version = "1.1"
var debug = false
// MARK: Exit status code
enum ExitCode: Int32 {
case success = 0
@akio0911
akio0911 / Regexp.swift
Last active March 14, 2016 06:01 — forked from feelingplace/Regexp.swift
Swift utility class for regular expression
import Foundation
extension String {
func isMatch(regexp:Regexp) -> Bool {
let range = NSMakeRange(0, self.characters.count)
let matches = regexp.internalRegexp.matchesInString(self, options: [], range:range )
return matches.count > 0
}
func matches(regexp:Regexp) -> [String]? {