Skip to content

Instantly share code, notes, and snippets.

View dpfannenstiel's full-sized avatar

Dustin Pfannenstiel dpfannenstiel

View GitHub Profile
@dpfannenstiel
dpfannenstiel / uikit-protocols.md
Created January 6, 2014 01:53
UIKit Protocol Stubs
@dpfannenstiel
dpfannenstiel / mapkit-protocols.md
Created March 16, 2014 02:23
MapKit Protocol Stubs
{
"id": 1,
"student_id": 209,
"competency": {
"id": 1,
"title": "Computer Science",
"created_at": "2014-03-13T15:26:54Z",
"updated_at": null,
"credit_hour_equivalent": 2.5,
"domain": {
@dpfannenstiel
dpfannenstiel / SwiftKeyboardMethods.md
Last active September 6, 2015 10:12
Swift Keyboard Gists

Swift Keyboard Gists

Notification Center Registration

Add these lines to register for keyboard notifications.

	NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillShow:", name: UIKeyboardWillShowNotification, object: nil)
@dpfannenstiel
dpfannenstiel / README
Last active August 29, 2015 14:16
Run225-3
This failed on baseline after completing all Formatives.
@dpfannenstiel
dpfannenstiel / Readme.md
Created February 26, 2017 15:21
Node Vagrancy

bootstrap.sh a file to setup a virtual maching with Node and Mongo

@dpfannenstiel
dpfannenstiel / .gitignore
Created October 27, 2017 01:41
Swift Gitignore
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
@dpfannenstiel
dpfannenstiel / WWDC2021Misslist.md
Last active June 1, 2021 16:47
This year's list of things that should be announced at WWDC... but won't be.

WWDC 2021 Misslist

This year's list of things that should be announced at WWDC... but won't be.

Extension Support

Extensions were introduced for Xcode in 2016 and Swiftly went by the wayside. It's nice to automatically generate code, but extensions should be able to do more.

Consider the case of Plists.

@dpfannenstiel
dpfannenstiel / gist:b3ab5467c576cdf533288c19c2f0d47d
Created March 20, 2022 21:37
Synchronous testing of async tasks.
func awaitWith<T>(
testName: String = #function,
file: StaticString = #file,
line: UInt = #line,
timeout: TimeInterval = 10,
task: @escaping () async throws -> T
) throws -> T {
var value: T?
let handler: (T) -> Void = { value = $0 }
let expectation = expectation(description: testName)