Skip to content

Instantly share code, notes, and snippets.

View sukeyang's full-sized avatar
💭
I may be slow to respond.

sukeyang sukeyang

💭
I may be slow to respond.
View GitHub Profile
@sukeyang
sukeyang / PSPDFUIKitMainThreadGuard.m
Created January 8, 2018 10:16 — 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.
// PLEASE DUPE rdar://27192338 (https://openradar.appspot.com/27192338) if you would like to see this in UIKit.
#import <objc/runtime.h>
#import <objc/message.h>
@sukeyang
sukeyang / linkmap.js
Created September 29, 2016 06:27 — forked from bang590/linkmap.js
XCode Linkmap Parser
var readline = require('readline'),
fs = require('fs');
var LinkMap = function(filePath) {
this.files = []
this.filePath = filePath
}
LinkMap.prototype = {
start: function(cb) {
//
// YTKAnimatingRequestAccessory.h
// Ape_uni
//
// Created by Chenyu Lan on 10/30/14.
// Copyright (c) 2014 Fenbi. All rights reserved.
//
#import <Foundation/Foundation.h>
@sukeyang
sukeyang / archive_to_upload_fir.sh
Created June 29, 2016 07:48 — forked from KinoAndWorld/archive_to_upload_fir.sh
自动打包并上传到Fir
#!/bin/bash
# init build configuration
# archive and ipa output path
build_path="./build"
# if file not exist , create it
if [ ! -x "$build_path" ]; then
mkdir "$build_path"
fi