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
/* | |
UITableViewExtensions.swift | |
Easily animate a UITableView between two data sources. | |
Ensure that the objects in your data source implement the Equatable protocol. | |
This means they must have a declaration `MyClass: Equatable` followed by | |
`public func ==(lhs: MyClass, rhs: MyClass) -> Bool { |
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
/** | |
CoreBluetoothExtensions.swift | |
Easily identify which state a CBCentralManager or CBPeripheralManager is in | |
<https://gist.github.com/tannernelson/f6ba585244afa80b06d2> | |
*/ | |
import CoreBluetooth |
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
/** | |
UIViewExtensions.swift | |
Constrain a subview to all the edges of its superview with one line. | |
<https://gist.github.com/3dcab950560aea7ebc8f.git> | |
*/ | |
import UIKit |
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
/** | |
UIViewExtensions.swift | |
Instantiate a UIView object from a nib in the NSBundle. | |
<https://gist.github.com/tannernelson/4e8e8a31553e46de81fe> | |
*/ | |
import UIKit |
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
<?php | |
/** | |
* LaravelExceptionHandler.php | |
* | |
* Use this exception handle for your Laravel 5 based JSON APIs. | |
* It serves properly formatted JSON responses instead of the default Laravel HTML error pages. | |
* | |
* <https://gist.github.com/tannernelson/cb2d981a3cfeabd425b8> | |
*/ |
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
/** | |
MKMapViewExtensions.swift | |
Zoom into and center the MKAnnotations on an MKMapView with one line. With our without animation. | |
<https://gist.github.com/tannernelson/45741c070508f081657a> | |
*/ | |
import MapKit |
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
/** | |
Converts 16-bit 8:8 Fixed Point numbers to swift Doubles. | |
Fixed Point mathematical functions: | |
<https://courses.cit.cornell.edu/ee476/Math/> | |
Compare the results from these calls to the Examples from the "Fixed Point mathematical functions" paper. | |
Double.from88FixedPoint(0, 0) | |
Double.from88FixedPoint(1, 0) |
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
/** | |
IntExtensions.swift | |
Convert an arbitrary length byte array into a Swift Int | |
<https://gist.github.com/tannernelson/e720877bf7700138eb99> | |
*/ | |
extension Int { | |
static func fromByteArray(bytes: [UInt8]) -> Int { |
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
/** | |
NSTimeIntervalExtensions.swift | |
Return human readable string for any NSTimeInterval | |
<https://gist.github.com/tannernelson/e5d2e0bab5a58b938b08> | |
*/ | |
import Foundation |
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
// | |
// NSData.swift | |
// Pods | |
// | |
// Created by Tanner Nelson on 9/15/15. | |
// | |
// | |
import Foundation |
OlderNewer