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
post_install do |installer| | |
print "Setting the default SWIFT_VERSION to 4.0\n" | |
installer.pods_project.build_configurations.each do |config| | |
config.build_settings['SWIFT_VERSION'] = '4.0' | |
end | |
installer.pods_project.targets.each do |target| | |
if ['SomeTarget-iOS', 'SomeTarget-watchOS'].include? "#{target}" | |
print "Setting #{target}'s SWIFT_VERSION to 3.0\n" | |
target.build_configurations.each do |config| |
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
<?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"> | |
<dict> | |
<key>method</key> | |
<string>app-store</string> | |
<key>teamID</key> | |
<string>XXXXXXXXXX</string> | |
<key>uploadBitcode</key> | |
<true/> |
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
-- http://stackoverflow.com/questions/37812664/end-of-central-directory-signature-not-found-when-installing-xcode-8-beta-xip/37857162#37857162 | |
on run argv | |
tell application "Archive Utility" to open POSIX path of (item 1 of argv) | |
repeat | |
delay 5 | |
if application "Archive Utility" is not running then exit repeat | |
end repeat | |
end run |
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
//: # How to retrieve a host name and associated aliases from an IP address using Core Fondation's `CFHost` | |
import Cocoa | |
import XCPlayground | |
//: In order to get the callback working we use a simple class to implement the showcase. | |
class DNSResolve { | |
//: The IP address may be a Swift `String` thanks to the toll-free bridging to C strings. | |
let ip: String = "17.172.224.47" | |
//: We use an optional `CFHost` variable because CFHost neither comes with an initializer nor is conforming to the Nullable protocol. | |
var host: CFHost? | |
//: We use this array of `String`s to store the resolved host names. |
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
//////////////// | |
// on iPad Air 2 | |
//////////////// | |
// Boot as portrait | |
2015-06-15 19:57:47.597 ios9[16003:229076] viewDidLoad() | |
2015-06-15 19:57:47.598 ios9[16003:229076] viewWillAppear - false | |
2015-06-15 19:57:47.601 ios9[16003:229076] traitCollectionDidChange - nil | |
2015-06-15 19:57:47.602 ios9[16003:229076] viewWillLayoutSubviews() | |
2015-06-15 19:57:47.602 ios9[16003:229076] viewDidLayoutSubviews() |
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
-- AppleScript to create a new file in Finder | |
-- | |
-- Use it in Automator, with the following configuration: | |
-- - Service receives: no input | |
-- - In: Finder.app | |
-- | |
-- References: | |
-- - http://apple.stackexchange.com/a/129702 | |
-- - http://stackoverflow.com/a/6125252/2530295 | |
-- - http://www.russellbeattie.com/blog/fun-with-the-os-x-finder-and-applescript |
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
// Let's declare two structs that with different variables and different boolean values: | |
struct A { | |
let x = true | |
} | |
struct B { | |
let y = false | |
} |
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
private var didUpdateConstraints: Bool = false | |
override func updateConstraints() { | |
if (!didUpdateConstraints) { | |
self.buildStatusIndicatorView.autoPinEdgesToSuperviewEdgesWithInsets(UIEdgeInsetsZero, excludingEdge: ALEdge.Trailing) | |
self.buildStatusIndicatorView.autoSetDimension(ALDimension.Width, toSize: 10) | |
self.buildNumberLabel.autoPinEdgesToSuperviewEdgesWithInsets(UIEdgeInsets(top: 5, left: 15, bottom: 5, right: 5), excludingEdge: ALEdge.Bottom) | |
self.buildNumberLabel.autoSetDimension(ALDimension.Height, toSize: 23) |
Ripped off from adrianshort.org
$ git remote -v
origin https://github.com/hakimel/reveal.js.git (fetch)
origin https://github.com/hakimel/reveal.js.git (push)
NewerOlder