Skip to content

Instantly share code, notes, and snippets.

View wbcyclist's full-sized avatar

jasio wbcyclist

  • Guangzhou
View GitHub Profile
{320, 568} @2x 非全面屏 iPhone 5s / SE / SE2
{375, 667} @2x 非全面屏 iPhone 6 / 7 / 8 / SE3
竖屏: StatusBarHeight=20, NavBarHeight=44, NavBarItemOffset=16, HomeIndicator=0
横屏: StatusBarHeight=0, NavBarHeight=32, NavBarItemOffset=20, HomeIndicator=0
{414, 736} @3x 非全面屏 iPhone 6Plus / 7Plus / 8Plus
竖屏: StatusBarHeight=20, NavBarHeight=44, NavBarItemOffset=20, HomeIndicator=0
横屏: StatusBarHeight=0, NavBarHeight=44, NavBarItemOffset=20, HomeIndicator=0
{375, 812} @3x 全面屏 iPhone X / XS / 11Pro
@wbcyclist
wbcyclist / WWDC_2015_downloader.rb
Created December 29, 2015 14:08 — forked from WeZZard/WWDC_2015_downloader.rb
WWDC_2015_downloader.rb
require 'rubygems'
require 'mechanize'
if !((ARGV[0] == 'SD' || ARGV[0] == 'HD' || ARGV[0] == 'ALL') && ARGV.size == 1)
puts %q{Usage: ruby WWDC_2015_downloader.rb SD | HD | ALL}
puts %q{Example: ruby WWDC_2015_downloader.rb SD - to download all SD videos}
puts %q{Example: ruby WWDC_2015_downloader.rb HD - to download all HD videos}
puts %q{Example: ruby WWDC_2015_downloader.rb ALL - to download videos in all resolutions}
exit
end
@wbcyclist
wbcyclist / ngrok-selfhosting-setup.md
Created December 26, 2015 10:53 — forked from lyoshenka/ngrok-selfhosting-setup.md
How to setup Ngrok with a self-signed SSL cert

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

@wbcyclist
wbcyclist / surge.conf
Created October 6, 2015 12:59 — forked from janlay/README.md
Yet another config for Surge.app
# This config file was created for myself (@janlay). You may want to add or remove some rules to make efficient use of the Internet.
[General]
# warning, notify, info, verbose
loglevel = notify
# bypass HTTP persistent connections
bypass = e.crashlytics.com
[Proxy]
# http, https, socks5
@wbcyclist
wbcyclist / xcode-build-bump.sh
Last active September 2, 2015 07:53 — forked from sekati/xcode-build-bump.sh
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@wbcyclist
wbcyclist / time.py
Last active December 25, 2017 06:59 — forked from delong8/time.py
import time
from datetime import datetime, date
# 今天
datetime.datetime.today().date().isoformat()
# 通过日期对象生成时间戳
int(time.mktime(datetime.now().timetuple()))
# 通过时间戳生成日期对象,timestamp 的时间戳以秒为单位
@wbcyclist
wbcyclist / TexturePackerSplit.py
Created June 7, 2015 12:23
TexturePacker解析plist还原原图
#!python
import os
import sys
from xml.etree import ElementTree
from PIL import Image
def endwith(s, *endstring):
array = map(s.endswith, endstring)
@wbcyclist
wbcyclist / NSString+isNumeric.h
Created May 4, 2015 18:16
NSString是否数字
#import <Foundation/Foundation.h>
@interface NSString (isNumeric)
- (BOOL) isAllDigits;
- (BOOL) isNumeric;
@end
@wbcyclist
wbcyclist / shell 批量重命名
Last active August 29, 2015 14:16
shell 批量重命名
# 将Game.Of.Thrones.S01.E01.BluRay.720p.mkv批量增加播放日期在BluRay前
# 如:mv Game.Of.Thrones.S01.E01.BluRay.720p.mkv Game.Of.Thrones.S01.E01.2011.BluRay.720p.mkv
# 批量命令行打印
ls Game.Of.Thrones.S01* | awk -F "BluRay" '{print "mv\t" $0 "\t" $1"2011.BluRay"$2}'
#执行:
ls Game.Of.Thrones.S01* | awk -F "BluRay" '{print "mv\t" $0 "\t" $1"2011.BluRay"$2}'|sh
@wbcyclist
wbcyclist / Podfile
Last active August 29, 2015 14:10
Custom Podfile
source 'https://github.com/CocoaPods/Specs.git'
inhibit_all_warnings!
def import_pods
pod 'MagicalRecord'
end
def model_common_pods
pod 'AFNetworking', '~> 2.4.1'
pod 'ReactiveCocoa', '~> 2.3.1', :inhibit_warnings => true