This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| # Mac OS X | |
| *.DS_Store | |
| # Xcode | |
| *.pbxuser | |
| *.mode1v3 | |
| *.mode2v3 | |
| *.perspectivev3 | |
| *.xcuserstate | |
| project.xcworkspace/ |
| // example function where arguments 2 and 3 are optional | |
| function example( err, optionalA, optionalB, callback ) { | |
| // retrieve arguments as array | |
| var args = []; | |
| for (var i = 0; i < arguments.length; i++) { | |
| args.push(arguments[i]); | |
| } | |
| // first argument is the error object |
| // Modified version of an Apple Docs example that accomodates for the extra milliseconds used in NodeJS/JS dates | |
| // https://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/DataFormatting/Articles/dfDateFormatting10_4.html#//apple_ref/doc/uid/TP40002369-SW1 | |
| - (NSDate *)dateForRFC3339DateTimeString:(NSString *)rfc3339DateTimeString { | |
| NSDateFormatter *rfc3339DateFormatter = [[NSDateFormatter alloc] init]; | |
| [rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'"]; | |
| [rfc3339DateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]]; | |
| // Convert the RFC 3339 date time string to an NSDate. |
| ######################### | |
| # .gitignore file for Xcode4 and Xcode5 Source projects | |
| # | |
| # Apple bugs, waiting for Apple to fix/respond: | |
| # | |
| # 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
| # | |
| # Version 2.6 | |
| # For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
| # |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| import CoreLocation | |
| extension CLLocationCoordinate2D: Equatable {} | |
| public func ==(lhs: CLLocationCoordinate2D, rhs: CLLocationCoordinate2D) -> Bool { | |
| return lhs.latitude == rhs.latitude && lhs.longitude == rhs.longitude | |
| } |
| - (void)viewWillAppear:(BOOL)animated | |
| { | |
| [super viewWillAppear:animated]; | |
| [[NSNotificationCenter defaultCenter] addObserver:self | |
| selector:@selector(keyboardWillChange:) | |
| name:UIKeyboardWillChangeFrameNotification | |
| object:nil]; | |
| } | |
| - (void)viewWillDisappear:(BOOL)animated |
| import Foundation | |
| import XCPlayground | |
| // Let asynchronous code run | |
| XCPSetExecutionShouldContinueIndefinitely() | |
| if let url = NSURL(string: "http://www.google.com/") { | |
| let session = NSURLSession.sharedSession() | |