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
lazy var myLabel: UILabel = { | |
var temporaryLabel : UILabel = UILabel() | |
return temporaryLabel | |
}() | |
let testLabel: UILabel { | |
if !_testLabel { | |
_testLabel = UILabel() | |
} | |
return _testLabel! |
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 | |
# Open iPhone Simulator on default location for XCode 4.3 if found | |
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open iPhone Simulator on default location for XCode 4.2 if found | |
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app |
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
require 'eventmachine' | |
require 'em-http' | |
require 'fiber' | |
# Borrowed from http://www.igvita.com/2010/03/22/untangling-evented-code-with-ruby-fibers/ | |
def async_fetch(url) | |
# Grab a reference to which fiber I am | |
f = Fiber.current |
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
var data2xml = require("data2xml"), | |
key = 'splashScreen', | |
xmlObject = {}, | |
imgPath = "dummyImage.png"; | |
xmlObject[key] = {}, | |
xmlObject[key]['image'] = []; | |
// Push 2 different images for each localization | |
xmlObject[key]["image"].push({ |
NewerOlder