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)
-- 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 [email protected]:<YOUR ACCOUNT>/<YOUR REPOS>.git |
# 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 |
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)
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) |
// Let's declare two structs that with different variables and different boolean values: | |
struct A { | |
let x = true | |
} | |
struct B { | |
let y = false | |
} |
-- 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 |
//////////////// | |
// 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() |
//: # 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. |
-- 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 |
Author: Chris Lattner