Skip to content

Instantly share code, notes, and snippets.

View zfkun's full-sized avatar
🎯
Focusing

zfkun zfkun

🎯
Focusing
View GitHub Profile
@zfkun
zfkun / sublime_text3_crack.md
Created January 4, 2016 03:49 — forked from sublime-crack4/sublime_text3_crack.md
Sublime Text crack 3095 3083 Win64 Win32 Linux64 Linux32 OSX Mac MacOS latest

cat

For pupil: all binary can be downloaded http://pan.baidu.com/s/1ntCChyp

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmer:

VERSION PLATFORM OFFSET ORIGINAL CRACKED
@zfkun
zfkun / versionCompare.js
Created February 11, 2015 16:31
version compare toolkit
/**
* 版本对比
*
* @param {string} a 对比版本号
* @param {string} b 参考版本号
* @return {number} `1`(`a > b`) || `-1`(`a < b`) || `0`(`a = b`)
*/
function versionCompare(a, b) {
a = a.split('.');
b = b.split('.');
@zfkun
zfkun / getUUID4IOS
Created September 8, 2014 04:35
get IOS Deveice's UUID by shell
system_profiler SPUSBDataType | grep "Serial Number:.*" | sed s#".*Serial Number: "##
@zfkun
zfkun / getCurrentScript.js
Created August 1, 2014 13:14
get current script url
/**
* @Link https://github.com/RubyLouvre/mass-Framework/blob/master/mass.js
*/
function getCurrentScript(base) {
// 参考 https://github.com/samyk/jiagra/blob/master/jiagra.js
var stack;
try {
a.b.c(); //强制报错,以便捕获e.stack
} catch (e) { //safari的错误对象只有line,sourceId,sourceURL
stack = e.stack;
@zfkun
zfkun / git server with ssh.md
Last active August 29, 2015 14:04
git server with ssh

1. 安装 git server

省略

2. 创建 git 用户 及 .ssh 目录

useradd git --disabled-password
su git
mkdir ~/.ssh
@zfkun
zfkun / apple-touch-startup-image.html
Created July 23, 2014 15:32
apple touch startup image
<!-- iOS 6 & 7 iPad (retina, portrait) -->
<link href="startup-image-1536x2008.png"
media="(device-width: 768px) and (device-height: 1024px)
and (orientation: portrait)
and (-webkit-device-pixel-ratio: 2)"
rel="apple-touch-startup-image">
<!-- iOS 6 & 7 iPad (retina, landscape) -->
<link href="startup-image-1496x2048.png"
media="(device-width: 768px) and (device-height: 1024px)
@zfkun
zfkun / OS X Mavericks U盘安装盘制作.md
Created June 24, 2014 16:40
OS X Mavericks U盘安装盘制作

假设 10.9.3 系统安装文件位于 /Install OS X Mavericks.app 假设 U盘 已格式化好(Mac OS扩展(日志式)格式),且命名 为 Mavericks

创建 U盘安装盘 的命令如下

sudo /Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Mavericks --applicationpath /Install\ OS\ X\ Mavericks.app --nointeraction

等待输出即可

@zfkun
zfkun / apple-touch-icon.html
Created June 17, 2014 15:44
apple touch icon
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≤ 6: -->
<link rel="apple-touch-icon" sizes="72x72" href="apple-touch-icon-72x72.png">
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≥ 7: -->
<link rel="apple-touch-icon" sizes="76x76" href="apple-touch-icon-76x76.png">
<!-- For iPhone with high-resolution Retina display running iOS ≤ 6: -->
<!-- For non-Retina iPhone, iPod Touch, and Android 2.1+ devices: -->
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≤ 6: -->
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="apple-touch-icon-72x72-precomposed.png">
<!-- For the iPad mini and the first- and second-generation iPad on iOS ≥ 7: -->
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="apple-touch-icon-76x76-precomposed.png">
<!-- For iPhone with high-resolution Retina display running iOS ≤ 6: -->
@zfkun
zfkun / moneyFormat.js
Created May 30, 2014 05:55
number to money style
define( function ( require, exports, module ) {
/**
* 货币数字格式化
* 将数字整数部分按3位分组加逗号格式化
*
* @example
* ```javascript
* var money = 123456789.1234567;
* var moneyFormated = toMoney( money );