Skip to content

Instantly share code, notes, and snippets.

😑
Need charging

Klein Mioke Mioke

😑
Need charging
Block or report user

Report or block Mioke

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
@Mioke
Mioke / PSPDFUIKitMainThreadGuard.m
Created Oct 29, 2016 — 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…
View PSPDFUIKitMainThreadGuard.m
// 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>
@Mioke
Mioke / self-sizing-cell.swift
Created Apr 15, 2016 — forked from onevcat/self-sizing-cell.swift
Self-sizing cell with auto layout
View self-sizing-cell.swift
tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 100
@Mioke
Mioke / xcodeproj_build.rb
Created Apr 15, 2016 — forked from onevcat/xcodeproj_build.rb
Example of using xcodeproj
View xcodeproj_build.rb
require_relative "../config.rb"
gem 'xcodeproj', '>=0.19.4'
require 'xcodeproj'
PROJECT = 'Unity-iPhone'
TARGET = 'Unity-iPhone'
LIBRARY = 'Libraries'
### Export
def exportUnityProject
@Mioke
Mioke / build_ios.rb
Created Apr 15, 2016 — forked from onevcat/build_ios.rb
Build an iOS ipa
View build_ios.rb
def buildiOS(projectPath, schemeName, archiveName, outPath, ipaName, appId)
absolutePath = `pwd`.strip
FileUtils.cd("#{projectPath}") do
puts "xcodebuild
-scheme #{schemeName}
-destination generic/platform=iOS
-archivePath #{absolutePath}/out/temp/#{archiveName}
archive
PROVISIONING_PROFILE=\"#{SAMPLE_IOS_APP_PROVISIONING_PROFILE_UUID}\"
CODE_SIGN_IDENTITY=\"#{SAMPLE_IOS_APP_CERTIFICATION}\""
@Mioke
Mioke / update-version.sh
Created Apr 15, 2016 — forked from onevcat/update-version.sh
Update build version by the commit count in git
View update-version.sh
git=`sh /etc/profile; which git`
appBuild=`"$git" rev-list --all |wc -l`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $appBuild" "${SRCROOT}/${INFOPLIST_FILE}"
echo "Updated ${TARGET_BUILD_DIR}/${INFOPLIST_PATH}"
@Mioke
Mioke / nginx_config.md
Last active Jan 15, 2020
Mac OS下安装及配置nginx
View nginx_config.md
You can’t perform that action at this time.