Author: Chris Lattner
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 | |
#Setup the environnement | |
mkdir wwdc2017 | |
cd wwdc2017 | |
mkdir tmp_download | |
cd tmp_download | |
#Extract IDs | |
echo "Downloading the index" |
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
//: Playground - noun: a place where code can play | |
import UIKit | |
//Most precise time keeper | |
// for more information on the benchmarks go to www.kandelvijaya.com | |
func timeBlockWithMach(_ block: () -> Void) -> TimeInterval { | |
var info = mach_timebase_info() | |
guard mach_timebase_info(&info) == KERN_SUCCESS else { return -1 } |
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 UIKit | |
class TextEditing: UIViewController { | |
@IBOutlet weak var textView: UITextView? | |
func updateText(with newString: String?) { | |
guard let textView = textView, newString = newString, (diffRange, changedText) = diff(textView.text, newString) else { return } | |
guard let selectedRange = textView.selectedTextRange else { textView.text = newString; return } | |
textView.text = newString |
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
protocol Expr { | |
static func lit(_ x: Int) -> Self | |
static func add(_ lhs: Self, _ rhs: Self) -> Self | |
} | |
extension Int : Expr { | |
static func lit(_ x : Int) -> Int { | |
return x; | |
} | |
static func add(_ lhs: Int, _ rhs: Int) -> Int { |
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
(* | |
ParserLibrary_v2.fsx | |
Version 2 of the code for a parser library. | |
Related blog post: http://fsharpforfunandprofit.com/posts/understanding-parser-combinators-2/ | |
*) | |
open System |
WARNING These steps are probably out dated and will not work.
To re-sign an iOS app with another developer account, ensure that the following are in place first.
- Distribution certificate of the other developer account
- A provisioning profile from the other developer account
Note that the Apple requires bundle IDs to be globally unique, even across accounts. So a bundle ID i.e. CFBundleIdentifier
from one account can't be used in a different account, even though the team id/prefix would be different.
Ensure that the new distribution certificate is in your keychain and the new provisioning profile on your disk.