Skip to content

Instantly share code, notes, and snippets.

View troystribling's full-sized avatar

Troy Stribling troystribling

  • San Francisco, CA
View GitHub Profile
@sharplet
sharplet / SimpleNetworkingExample.swift
Created September 14, 2017 21:37
Example Source Code for "A Simple Approach to Thread-Safe Networking in iOS Apps"
import Foundation
import PlaygroundSupport
enum URLResult {
case response(Data, URLResponse)
case error(Error, Data?, URLResponse?)
}
extension URLSession {
@discardableResult
#!/usr/bin/env bash
# Build open source Swift in a specified directory after cloning the appropriate Github repos.
# Select an alternative Github account (such as hpux735 for William Dillon's forks) to clone swift, swift-llvm, swift-lldb, and swift-corelibs-foundation repos from.
ALTREPO="apple"
# Interval for collecting vmstat, df, and CPU temperature data
STATINTERVAL=300