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:
#!/bin/bash | |
f=$(pwd) | |
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork" | |
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x" | |
sips --resampleWidth 57 "${f}/${1}" --out "${f}/Icon.png" | |
sips --resampleWidth 114 "${f}/${1}" --out "${f}/Icon@2x.png" | |
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-Small.png" | |
sips --resampleWidth 58 "${f}/${1}" --out "${f}/Icon-Small@2x.png" | |
sips --resampleWidth 50 "${f}/${1}" --out "${f}/Icon-Small-50.png" |
main() { | |
var user = 'John Doe'; | |
var message = """ | |
$user! | |
Welcome to Programming Dart! | |
"""; | |
print(message); | |
} |
#if TARGET_OS_IPHONE | |
#import <MobileCoreServices/MobileCoreServices.h> | |
#else | |
#import <CoreServices/CoreServices.h> | |
#endif | |
/* | |
MIME type to UTI | |
*/ | |
NSURLResponse *response = ... // assume a URL response from somewhere else. |
git fetch upstream | |
git reset --hard upstream/master |
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
// | |
// KIFUITestActor+Helper.h | |
// | |
// Created by Max Chuquimia on 10/04/2014. | |
// | |
// | |
#import "KIFUITestActor.h" | |
@interface KIFUITestActor (Helper) |
#!/bin/bash | |
f=$(pwd) | |
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork" | |
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x" | |
sips --resampleWidth 57 "${f}/${1}" --out "${f}/Icon.png" | |
sips --resampleWidth 114 "${f}/${1}" --out "${f}/Icon@2x.png" | |
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-Small.png" |
/*----------------------------------------------------*/ | |
#pragma mark - XCTAsserts | |
/*----------------------------------------------------*/ | |
XCTAssert(expression, format...); | |
XCTAssertTrue(expression, format...); | |
XCTAssertFalse(expression, format...); | |
XCTAssertEqual(expression1, expression2, format...); | |
XCTAssertNotEqual(expression1, expression2, format...); | |
XCTAssertNil(expression, format...); |
//: Permutations | |
// based on https://www.objc.io/blog/2014/12/08/functional-snippet-10-permutations/ | |
// but updated for Swift 2.0 (Xcode 7.0) | |
extension Array { | |
func decompose() -> (Generator.Element, [Generator.Element])? { | |
guard let x = first else { return nil } | |
return (x, Array(self[1..<count])) | |
} | |
} |