Skip to content

Instantly share code, notes, and snippets.

@zorn
zorn / gist:c20d7ddddf06ac3f5c61
Created May 4, 2015 21:56
UIViewController pseudo code
import UIKit
class UIViewController : NSObject {
var _view: UIView?
var view: UIViewb = {
if isViewLoaded() == false {
loadView()
viewDidLoad()
}

In case you oupsed again..

The "Oh no I should have been working in a branch" Trick

# takes staged changes and 'stashes' them for later, and reverts to HEAD. 
$ git stash
 
# creates new branch and switches to it, then takes the stashed changes and stages them in the new branch.   fancy!
$ git stash branch new-branch-name