Instantly share code, notes, and snippets.

View DispatchTime+Helpers.swift
extension DispatchTime {
/// Returns a dispatch time a number of seconds from now.
///
/// - Parameter amount: The seconds to add to now.
/// - Returns: A dispatch time within a number of seconds from now.
///
/// - Seealso: [Easy dispatch tricks](http://ericasadun.com/2017/05/23/5-easy-dispatch-tricks/)
static func secondsFromNow(_ amount: Double) -> DispatchTime {
return self.now() + amount
View SegueHandler.swift
//
// SegueHandler.swift
//
// Taken from WWDC 2015's [Swift in Practice](https://developer.apple.com/videos/play/wwdc2015/411/).
//
import UIKit
// MARK: - Working With Segues
View Makefile
SHELL = bash
###
# xcodebuild common arguments
###
WORKSPACE := MyProject.xcworkspace
SCHEME := MyScheme
PROJECT := MyProject.xcodeproj
DEBUG_CONFIGURATION := Debug
SIMULATOR := platform=iOS Simulator,OS=9.2,name=iPhone 6
View PrefixHeader.pch
#ifdef DEBUG
// Prettier debug messages.
#define DLog(fmt, ...) NSLog((@"%s(%d): " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__)
#else
// Disable debug messages in production mode.
#define DLog(...) do { } while (0)