WWDC 2006 2007 2008 2009 2010 2011 2012 2013 2014
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public extension Optional { | |
/// Stop in the debugger in debug builds if self is `.none`. | |
/// | |
/// Example usage: | |
/// | |
/// guard let value = maybeValue.assertUnwrap() else { return "bogus value" } | |
/// | |
func assertUnwrap(_ message: @autoclosure () -> String? = nil, file: StaticString = #file, function: String = #function, line: UInt = #line) -> Wrapped? { | |
switch self { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc) | |
hex=$((cat <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- This is v0.6 of the custom script for AlfredApp for iTerm 2.9+ | |
-- Please see https://github.com/stuartcryan/custom-iterm-applescripts-for-alfred/ | |
-- for the latest changes. | |
-- Please note, if you store the iTerm binary in any other location than the Applications Folder | |
-- please ensure you update the two locations below (in the format of : rather than / for folder dividers) | |
-- this gets around issues with AppleScript not handling things well if you have two iTerm binaries on your system... which can happen :D | |
on alfred_script(q) | |
if application "iTerm2" is running or application "iTerm" is running then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CollectionViewDataSource.swift | |
// Khan Academy | |
// | |
// Created by Andy Matuschak on 10/14/14. | |
// Copyright (c) 2014 Khan Academy. All rights reserved. | |
// | |
import UIKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this to your app delegate. | |
// Neither `UINavigationController` nor `UITabBarController` have the slightest decency to ask their | |
// visible view controller whether IT would like to rotate and just go on and do whatever the hell | |
// they please. This'll show 'em. | |
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window { | |
UIViewController* topViewController = window.rootViewController; | |
do { | |
// Navigate modal controllers. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
// clang -g -Wall -framework Foundation -o someObject someObject.m | |
@interface SomeObject : NSObject | |
- (void) doSome: (id) stuff for: (id) reasons; | |
@end // SomeObject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Demos from class: | |
https://dl.dropboxusercontent.com/u/7070943/iOS%20Demos.zip | |
Dave Verwer's iOS Weekly: http://iosdevweekly.com/. I like this newsletter a lot, even though I've usually seen the links by the time it comes out it often reminds me I want to bookmark them. | |
Blogs: | |
- Matt Gemmell's blog - Matt is a brilliant UI/UX evangelist with incredible wit (@mattgemmell) | |
- Mike Ash's Friday Q&A - Mostly nitty-gritties, but incredibly helpful (@mikeash) | |
- Cocoa, With Love (Matt Gallagher) - opinion pieces and how-tos, mostly (@mattgallagher) | |
- Cocoa Is My Girlfriend (Marcus Zarra and Matt Long) - Core Data and Core Animation experts (@mzarra and @perlmunger) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface KUtils : NSObject | |
+ (NSString *)getVersionInfo; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
NewerOlder