Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save janroz/fbd6bd983ce5f8b4975776f054a6a177 to your computer and use it in GitHub Desktop.
Save janroz/fbd6bd983ce5f8b4975776f054a6a177 to your computer and use it in GitHub Desktop.
Final Cut Pro X trial reset
#!/usr/bin/swift
import Foundation
let path = NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath
let data = NSKeyedUnarchiver.unarchiveObject(withFile: path) as! NSDictionary
let mutableData = data.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableData {
if value is NSDate {
mutableData[key] = Date()
}
}
NSKeyedArchiver.archiveRootObject(mutableData, toFile: path)
print("You'd better buy it")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment