- Copy the contents of the last snippet (lldbinit) from the gist page, and paste into your .lldbinit file. This makes the ksdiff macro known inside lldb.
- Put file ksdiff.py in ~/.lldb/
sudo pip install temp
- Restart Xcode debug session
(lldb) ksdiff ;
public struct Error: ErrorType { | |
let source: String; let reason: String | |
public init(_ source: String = __FILE__, _ reason: String) { | |
self.reason = reason; self.source = source | |
} | |
} | |
protocol Contextualizable {} | |
extension Contextualizable { | |
func functionContext(function : String = __FUNCTION__) -> String { |
static NSData *PSPDFCalculateSHA256FromFileURL(NSURL *fileURL, CC_LONG dataLength, NSError **error) { | |
NSCParameterAssert(fileURL); | |
dispatch_queue_t shaQueue = dispatch_queue_create("com.pspdfkit.sha256-queue", DISPATCH_QUEUE_SERIAL); | |
__block dispatch_io_t readChannel; | |
void (^processIntError)(int intError) = ^(int intError) { | |
if (intError != 0) { | |
PSPDFLogWarning(@"Stream error: %d", intError); | |
if (error) *error = [NSError errorWithDomain:@"SHA256Error" code:100 userInfo:@{NSLocalizedDescriptionKey: @"failed to open file for calculating SHA256."}]; |
https://developer.apple.com/videos/wwdc/2015/?id=101 101 Keynote | |
https://developer.apple.com/videos/wwdc/2015/?id=102 102 Platforms State of the Union | |
https://developer.apple.com/videos/wwdc/2015/?id=103 103 Apple Design Awards | |
https://developer.apple.com/videos/wwdc/2015/?id=104 104 What's New in Xcode | |
https://developer.apple.com/videos/wwdc/2015/?id=105 105 Introducing WatchKit for watchOS 2 | |
https://developer.apple.com/videos/wwdc/2015/?id=106 106 What's New in Swift | |
https://developer.apple.com/videos/wwdc/2015/?id=107 107 What's New in Cocoa Touch | |
https://developer.apple.com/videos/wwdc/2015/?id=108 108 Building Watch Apps | |
https://developer.apple.com/videos/wwdc/2015/?id=112 112 Think Audacious | |
https://developer.apple.com/videos/wwdc/2015/?id=201 201 iOS Accessibility |
<?xml version="1.0" encoding="UTF-8"?> | |
<Bucket | |
type = "2" | |
version = "2.0"> | |
<Breakpoints> | |
<!-- All Exceptions --> | |
<BreakpointProxy | |
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> | |
<BreakpointContent |
/// Observes a run loop to detect any stalling or blocking that occurs. | |
/// | |
/// This class is thread-safe. | |
@interface GHRunLoopWatchdog : NSObject | |
/// Initializes the receiver to watch the specified run loop, using a default | |
/// stalling threshold. | |
- (id)initWithRunLoop:(CFRunLoopRef)runLoop; | |
/// Initializes the receiver to detect when the specified run loop blocks for |
// | |
// CollectionViewDataSource.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 10/14/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit |
public struct RandomNumberGenerator: SequenceType { | |
let range: Range<Int> | |
let count: Int | |
public init(range: Range<Int>, count: Int) { | |
self.range = range | |
self.count = count | |
} | |
public func generate() -> GeneratorOf<Int> { |
echo "Downloading HD Videos…" | |
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http.*._hd_.*dl=1">HD' | sed -e 's/\?dl=1">HD//g' | xargs -n1 wget -N -c | |
echo "Downloading SD Videos…" | |
curl https://developer.apple.com/videos/wwdc/2014/ | grep -iIoh 'http.*._sd_.*dl=1">SD' | sed -e 's/\?dl=1">SD//g' | xargs -n1 wget -N -c | |
echo "Downloading PDFs…" |
extension Array { | |
func first() -> Element? { | |
if isEmpty { | |
return nil | |
} | |
return self[0] | |
} | |
func last() -> Element? { |