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
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git |
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
-- 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 |
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)
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 the nuclear option. Use with extreme care | |
# Works up to and including Mountain Lion (10.8.x) | |
# Show all extended attributes | |
ls -lOe ~/dir-to-fix | |
# Remove no-change attributes | |
sudo chflags nouchg ~/dir-to-fix | |
# Recursively clear all entended attributes |
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
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
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) |
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 |
NewerOlder