Skip to content

Instantly share code, notes, and snippets.

@mallendeo
Last active October 1, 2015 04:07
Show Gist options
  • Save mallendeo/c0de817218caf71a2004 to your computer and use it in GitHub Desktop.
Save mallendeo/c0de817218caf71a2004 to your computer and use it in GitHub Desktop.
Open Sketch after expiration date
# This is for educational purposes only
# If you use Sketch a lot or for work you should buy it instead
# If you save this as Sketch.app it'll reopen itself
set username to long user name of (system info)
set pw to the text returned of (display dialog "Enter your password:" default answer "" with hidden answer)
set currDate to (do shell script "date +\"%m%d%H%M%y\"")
do shell script "date 0101120013" user name username password pw with administrator privileges
tell application "Sketch" to activate
do shell script "date " & currDate user name username password pw with administrator privileges
do shell script "/usr/sbin/systemsetup -setnetworktimeserver time.apple.com -setusingnetworktime on" user name username password pw with administrator privileges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment