Mountain Lion (10.8) has three main difference compared to Lion (10.7):
- XCode 4.4 does not install Command Line Tools by default
- X11 isn't available anymore
- The installed version of OpenSSL has some bugs
| #!/usr/bin/swift | |
| // DISCLAIMER | |
| // This script modifies an unencrypted file associated with the trial version of Final Cut Pro. | |
| // Under the DMCA (17 U.S.C. § 1201), this modification does not qualify as circumvention of a technological | |
| // protection measure (TPM), as it does not involve bypassing encryption, authentication, or similar protections. | |
| // Distributing this code is therefore legal under the DMCA. | |
| // This script is intended for educational and research purposes, such as exploring trial-related file structures, |
| func compress(videoPath : String, exportVideoPath : String, renderSize : CGSize, completion : (Bool) -> ()) { | |
| let videoUrl = NSURL(fileURLWithPath: videoPath) | |
| if (!existsFileAtUrl(videoUrl)) { | |
| completion(false) | |
| return | |
| } | |
| let videoAssetUrl = AVURLAsset(URL: videoUrl, options: nil) | |
| //If you have a Bridging-Header: | |
| #import <FBSDKCoreKit/FBSDKCoreKit.h> | |
| #import <FBSDKLoginKit/FBSDKLoginKit.h> | |
| //In your AppDelegate: | |
| func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [String: AnyObject]?) -> Bool { | |
| //App launch code | |
| FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions) | |
| //Optionally add to ensure your credentials are valid: |
| // ---------------------------------- | |
| //declaration in PRIVATE scope (for using only in your class) | |
| // ---------------------------------- | |
| // declare in .m | |
| static const int kTweetMaxCharacters = 140; | |
| static NSString * const kHelloString = @"HELLO!"; | |
| // ---------------------------------- | |
| // declaration in PUBLIC scope (for using in other classes too) | |
| // ---------------------------------- |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html