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:
class MYAttributedTextView <DTAttributedTextContentView | |
def layoutFrame | |
layout_frame = super | |
rect = layout_frame.frame | |
rect = UIEdgeInsetsInsetRect(self.bounds, edgeInsets) | |
new_frame = DTCoreTextLayoutFrame.alloc.initWithFrame(rect, layouter:self.layouter) | |
new_frame | |
end | |
end |
CVReturn displayLinkOutputCallback( | |
CVDisplayLinkRef displayLink, | |
const CVTimeStamp *inNow, | |
const CVTimeStamp *inOutputTime, | |
CVOptionFlags flagsIn, | |
CVOptionFlags *flagsOut, | |
void *displayLinkContext) | |
{ | |
@autoreleasepool { |
import Foundation | |
import AVFoundation | |
// AudioPlayer Class Definition | |
class AudioPlayer: NSObject { | |
private let runLoop: NSRunLoop = NSRunLoop.currentRunLoop() | |
private let stdinHandle: NSFileHandle = NSFileHandle.fileHandleWithStandardInput() | |
private let items: [AVPlayerItem]! | |
private var queuePlayer: AVQueuePlayer! |
// Trying to build a Rust version here | |
extern crate rustc_serialize; | |
use std::io; | |
use std::env; | |
use std::path::Path; | |
use std::fs::File; | |
use std::io::Read; | |
use std::vec; |
FROM ubuntu:15.10 | |
# Latest Swift Development Snapshot | |
ENV SWIFT_BRANCH development | |
ENV SWIFT_VERSION swift-DEVELOPMENT-SNAPSHOT-2016-03-01-a | |
ENV SWIFT_PLATFORM ubuntu15.10 | |
# Install Dependencies | |
RUN apt-get update && \ | |
apt-get install -y \ |
/* | |
Tested on OS X 10.11 and Ubuntu 15.10 | |
Exmaple: `$ drawRect 4 3` should output this: | |
┌──┐ | |
│ │ | |
└──┘ | |
*/ | |
// MARK: - Data Structures |
private func createDisplayLink() { | |
CVDisplayLinkCreateWithActiveCGDisplays(&displayLink) | |
guard let displayLink = displayLink else { | |
return | |
} | |
let callback: CVDisplayLinkOutputCallback = { (_, _, _, _, _, userInfo) -> CVReturn in | |
let myView = Unmanaged<MyView>.fromOpaque(COpaquePointer(userInfo)).takeUnretainedValue() | |
dispatch_async(dispatch_get_main_queue()) { | |
myView.update() |
[84/269] CompileC: CoreFoundation/NumberDate.subproj/CFBigNumber.c | |
FAILED: mkdir -p `dirname ../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/CoreFoundation/NumberDate.subproj/CFBigNumber.c.o`; /swift.org/build/Ninja-DebugAssert/llvm-linux-x86_64/bin/clang -fcolor-diagnostics -fdollars-in-identifiers -fblocks -fobjc-runtime=macosx-10.11 -fintegrated-as -fPIC --target=x86_64-linux-gnu -g -O0 -Ibootstrap/common/usr/include -Ibootstrap/common/usr/local/include -Ibootstrap/x86_64-linux-gnu/usr/include -Ibootstrap/x86_64-linux-gnu/usr/local/include -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation -I../build/Ninja-DebugAssert/foundation-linux-x86_64 -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/usr/lib/swift -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/usr/lib/swift/CoreFoundation -I../build/Ninja-DebugAssert/foundation-linux-x86_64/Foundation/usr/lib/swi |
.PHONY: docker | |
.PHONY: build | |
.PHONY: test | |
docker: | |
docker run -it \ | |
-v /Users/eyeplum/Projects/swift.org/:/swift.org \ | |
eyeplum/swift-foundation-dev \ | |
/bin/bash |