Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Final Cut Pro X trial reset
#!/usr/bin/swift
import Foundation
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath)
let data = try! NSData(contentsOf: path) as Data
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary
for (key, value) in mutableDictionary {
if value is NSDate {
mutableDictionary[key] = Date()
}
}
try! NSKeyedArchiver.archivedData(withRootObject: mutableDictionary, requiringSecureCoding: false).write(to: path)
print("You'd better buy it")
@PieroMarraffa
Copy link

Hi guys, I'm trying to run the command on my M1, but it still give me the error message "no such file or directory". Ran it on my intel mac and worked. Can you help me?

@scriptivRED
Copy link

Hello! I am trying to run this on my Intel Mac running Monterey and I keep getting the error code "zsh: event not found: /usr/bin/swift"

How do I solve this? This is running in Terminal, it seems that's how it needs to be done.

@TehBrian
Copy link

TehBrian commented May 2, 2023

Hello! I am trying to run this on my Intel Mac running Monterey and I keep getting the error code "zsh: event not found: /usr/bin/swift"

How do I solve this? This is running in Terminal, it seems that's how it needs to be done.

@scriptivRED, try this script instead: https://gist.github.com/TehBrian/bf82c7505b647d423da6d5abbe2b95a3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment