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
// | |
// Check.swift | |
// Points | |
// | |
// Created by Glen Hinkle on 10/2/16. | |
// Copyright © 2016 Zombie Dolphin. All rights reserved. | |
// | |
import Foundation | |
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
// Allows | |
// Storyboard.Main.viewController(MainVC) | |
enum Storyboard: String { | |
case Main | |
static let values = [Main] | |
static var boards = [Storyboard:UIStoryboard]() | |
func viewController<A: UIViewController>(type: A.Type) -> A { |
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
- (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated duration:(NSTimeInterval)duration completion:(void(^)(BOOL finished))completion { | |
void (^highlight)(UIView *, BOOL) = ^void(UIView *view, BOOL highlight) { | |
if (highlight) { | |
view.layer.borderWidth = 0.0; | |
view.layer.borderColor = [UIColor clearColor].CGColor; | |
view.layer.shadowOpacity = 0.0; | |
} | |
else { |
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
Within a NSManagedObject subclass called "Customer" | |
@NSManaged var pccf: PCCF? | |
func findOrCreatePCCF(context: NSManagedObjectContext) -> PCCF? { | |
if let pccf = self.pccf { | |
return pccf | |
} | |
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
map $http_upgrade $connection_upgrade { | |
default "upgrade"; | |
"" ""; | |
} | |
server { | |
listen 80; | |
location / { | |
proxy_pass http://docker; |
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
import Foundation | |
import UIKit | |
class CustomerDetailProgressVC: UIViewController { | |
@IBOutlet weak var scrollView: UIScrollView! | |
@IBOutlet weak var progressListView: UIView! | |
let rightItemPadding: CGFloat = 10 | |
let itemHeight: CGFloat = 60 | |
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 last6 = Range(start: advance(item.id.endIndex, -6), end: item.id.endIndex) | |
//label.text = item.id.substringWithRange(last6) |
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
import Foundation | |
import UIKit | |
import CoreData | |
class PresentationsListVC: UIViewController { | |
@IBOutlet weak var collectionView: UICollectionView? | |
// UICollectionView doesn't do beginUpdates/endUpdates. | |
// CoreData modifications are stored in here and performed together |
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
// | |
// ViewController.swift | |
// PDFAttempt | |
// | |
// Created by Glen Hinkle on 3/17/15. | |
// Copyright (c) 2015 Zombie Dolphin. All rights reserved. | |
// | |
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
func frontViewController(window: UIWindow) -> UIViewController { | |
if let rootVC = window.rootViewController { | |
var frontVC = rootVC | |
while (true) { | |
if let vc = frontVC.presentedViewController { frontVC = vc } | |
else { break } | |
} | |
return frontVC |