Skip to content

Instantly share code, notes, and snippets.

Dapeng Gao dpgao

Block or report user

Report or block dpgao

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am dpgao on github.
  • I am dpgao ( on keybase.
  • I have a public key whose fingerprint is 57D4 23CE 922E 0B6E B380 34A5 EE48 8EDD A59E 1E88

To claim this, I am signing this object:

View ImageDownloader.swift
final class ImageDownloader {
typealias CompletionHandler = (UIImage?) -> Void
private struct ResponseHandler {
let dataTask: URLSessionDataTask
var completionHandlers: [CompletionHandler]
private let lock = NSLock()
View pyramid-of-doom-1.swift
infix operator !=> { associativity left precedence 125 }
func !=><T>(lhs: T?, @noescape rhs: () -> Void) -> T? {
if let lhs = lhs { return lhs }
return nil
You can’t perform that action at this time.