Skip to content

Instantly share code, notes, and snippets.

View andrespch's full-sized avatar

Andrés Portillo andrespch

View GitHub Profile
@andrespch
andrespch / cloudSettings
Created July 31, 2017 14:11 — forked from spencercarli/bd3d4befe38185704bf0fc875e9deed6|configuration.json
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-07-29T21:12:58.647Z","extensionVersion":"v2.8.2"}
@andrespch
andrespch / PSPDFUIKitMainThreadGuard.m
Created February 3, 2016 17:25 — forked from steipete/PSPDFUIKitMainThreadGuard.m
This is a guard that tracks down UIKit access on threads other than main. This snippet is taken from the commercial iOS PDF framework http://pspdfkit.com, but relicensed under MIT. Works because a lot of calls internally call setNeedsDisplay or setNeedsLayout. Won't catch everything, but it's very lightweight and usually does the job.You might n…
// Taken from the commercial iOS PDF framework http://pspdfkit.com.
// Copyright (c) 2014 Peter Steinberger, PSPDFKit GmbH. All rights reserved.
// Licensed under MIT (http://opensource.org/licenses/MIT)
//
// You should only use this in debug builds. It doesn't use private API, but I wouldn't ship it.
#import <objc/runtime.h>
#import <objc/message.h>
// Compile-time selector checks.