Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Mioke's full-sized avatar
:octocat:
Thinking and doing

Klein Mioke Mioke

:octocat:
Thinking and doing
View GitHub Profile

Content

@Mioke
Mioke / nginx_config.md
Last active June 10, 2023 06:20
Mac OS下安装及配置nginx
@Mioke
Mioke / update-version.sh
Created April 15, 2016 02:18 — forked from onevcat/update-version.sh
Update build version by the commit count in git
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 / build_ios.rb
Created April 15, 2016 02:51 — forked from onevcat/build_ios.rb
Build an iOS ipa
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 / xcodeproj_build.rb
Created April 15, 2016 02:52 — forked from onevcat/xcodeproj_build.rb
Example of using xcodeproj
require_relative "../config.rb"
gem 'xcodeproj', '>=0.19.4'
require 'xcodeproj'
PROJECT = 'Unity-iPhone'
TARGET = 'Unity-iPhone'
LIBRARY = 'Libraries'
### Export
def exportUnityProject
@Mioke
Mioke / self-sizing-cell.swift
Created April 15, 2016 02:57 — forked from onevcat/self-sizing-cell.swift
Self-sizing cell with auto layout
tableView.rowHeight = UITableViewAutomaticDimension
tableView.estimatedRowHeight = 100
@Mioke
Mioke / PSPDFUIKitMainThreadGuard.m
Created October 29, 2016 07:18 — 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>