Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ryangibson on github.
  • I am ryang (https://keybase.io/ryang) on keybase.
  • I have a public key whose fingerprint is 52F2 7C13 60ED 944F BDCE CF5A 0916 2989 61EE DBC8

To claim this, I am signing this object:

@ryangibson
ryangibson / version.js
Last active August 29, 2015 14:04
Simple version parse and compare.
function Version(versionString) {
this.version = {
major: 0,
minor: 0,
patch: 0
};
if (versionString) {
this.parse(versionString);
}
}
@ryangibson
ryangibson / version.js
Created December 3, 2015 12:04
Simple sem ver class.
function Version(versionString) {
this.version = {
major: 0,
minor: 0,
patch: 0
};
if (versionString) {
this.parse(versionString);
}
}
// MARK: Protocols
protocol ResponderProtocol {
var nextResponder: ResponderProtocol? { get }
}
protocol CopyProtocol {
func copy()
}
// MARK: Concrete responder
import UIKit
import PlaygroundSupport
let cellIdentifier = "cellId"
let dataUrl = URL(string: "https://raw.githubusercontent.com/facebook/react-native/master/docs/MoviesExample.json")!
func contstraint(_ attr: NSLayoutAttribute, from: UIView, to: UIView) -> NSLayoutConstraint {
return NSLayoutConstraint(
item: from,
attribute: attr,