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
tmpfile=$(mktemp) | |
prjfile=project.pbxproj | |
plutil -convert xml1 ${prjfile} -o - \ | |
| plutil -replace "objects.071AC71E45E94004142F8190.includeInIndex" -string 2 -o - - \ | |
| pl \ | |
> ${tmpfile} | |
cat ${tmpfile} > ${prjfile} | |
rm -f ${tmpfile} |
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 $ from "./query" | |
class AppManager { | |
constructor(viewControllerClasses) { | |
this.viewControllerClasses = viewControllerClasses | |
this.assemble() | |
} | |
// Find html nodes for the registered view controller classes. |
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 | |
// Message Type | |
struct Message<Target> { | |
let action: (Target) -> () | |
init(_ action: (Target) -> ()) { | |
self.action = action | |
} | |
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
// https://xkcd.com/936/ | |
selbstgefälligste-darlehen-philosophieren-sprechfenster | |
verwitwete-pseudolegierung-vertrödele-fernfahrer | |
neuronale-videos-piepen-wanderführer | |
weihnachtliche-printen-erwachten-bambus | |
pejorativstes-palais-erklärte-übermacht | |
dekorativster-lutscher-schwante-halt | |
tugendsamste-ablichtung-verplant-truppe | |
vollmundigerer-boß-lindere-altersgrenzen |
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
#search h3.r a[href*="www.w3schools.com"] { | |
pointer-events: none; | |
cursor: default; | |
} | |
#search h3.r a[href*="www.w3schools.com"]::after { | |
content: ""; | |
position: absolute; | |
top: 0; | |
left: 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
import Foundation | |
class BaseClass : Equatable { | |
var stringValue: String = "" | |
} | |
class SubClass : BaseClass { | |
var intValue: Int = 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
import UIKit | |
// We define a APIResultType as something that can be generated from a JSON | |
protocol APIResultType { | |
init?(json: String) | |
} |
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 | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
let rootViewController = RootViewController() | |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { | |
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
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) { | |
var detailViewContoller: UIViewController? | |
if (segue.identifier == "ShowDetail") { | |
detailViewContoller = segue.destinationViewController as? UIViewController | |
} else if (segue.identifier == "ShowDetailWithNavigationController") { | |
let navigationController = segue.destinationViewController as UINavigationController | |
detailViewContoller = navigationController.viewControllers[0] as? UIViewController | |
} |
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
override func shouldPerformSegueWithIdentifier(identifier: String!, sender: AnyObject!) -> Bool { | |
let needsNavigationController = (splitViewController.traitCollection.horizontalSizeClass == .Regular) | |
if identifier == "ShowDetail" && needsNavigationController { | |
performSegueWithIdentifier("ShowDetailWithNavigationController", sender: sender) | |
return false; | |
} | |
return super.shouldPerformSegueWithIdentifier(identifier, sender: sender) |
NewerOlder