This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'cgi' | |
require 'digest/md5' | |
require 'net/https' | |
require 'uri' | |
module Jekyll | |
class GistTag < Liquid::Tag | |
def initialize(tag_name, text, token) | |
super | |
@text = text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open mobile safari | |
echo Open mobile safari on emulator and press return | |
read | |
# Plug debug to MobileSafari.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package { | |
import flash.display.Loader; | |
import flash.display.MovieClip; | |
import flash.events.Event; | |
import flash.system.LoaderContext; | |
import flash.utils.ByteArray; | |
public class Framesync { | |
// Raw SWF bytecode (contains two empty keyframes on the main timeline) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This code takes a 2D transformation matrix described as a one-dimensional array | |
(in column order, top to bottom and left to right) and decomposes it using the dojo | |
matrix library. This input matrix should produce a 45-deg X skew: | |
1 1 0 | |
0 1 0 | |
0 0 1 | |
The output of decompose() looks like this: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#################################################### | |
###欢迎您选用 WWW.HOST700.com VPS 低价 稳定 实惠 ### | |
#################################################### | |
#开始先配置shadowsocks这个就大概说下 | |
git clone git://github.com/clowwindy/shadowsocks.git | |
#然后进入 | |
cd shadowsocks | |
#然后配置下config.json文件 | |
vim config.json #具体的配置自己看很简单 | |
#运行服务端 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[ | |
onlytcp lua客户端 | |
因为发现luasocket receive(number)方式的一个奇惨问题 所以收数据改成了按行读取 | |
]] | |
CONST_Socket_TickTime = 0.1--SOCKET接收信息轮训时间 | |
CONST_Socket_ReconnectTime = 5--socket重连偿试时间时隔 | |
CONST_HeartBeaT_TimeOut = 20--socket心跳超时时间 | |
CONST_HeartBeaT_SendTime = 15--socket心跳发送间隔 | |
CONST_HeartBeaT_CheckTime = 25--socket心跳检查时间 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// program | |
package main | |
import "fmt" | |
import "sync/atomic" | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# Original File: https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb | |
# Modified by Yu-Cheng Chuang <[email protected]> | |
# Licensed under MIT License (same as the original file) | |
# This version of wordpressdotcom.rb is compatible | |
# with the real-world Wordpress.com export file, which: | |
# | |
# - Makes paragraphs (<p>) and line breaks (<br>) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use FindBin qw/$Bin/; | |
use Data::Dumper; | |
#my @dirs = ('E:/quick-cocos2d-x/framework/client', 'E:/quick-cocos2d-x/shared'); | |
#my @tolua_dirs = ('E:/quick-cocos2d-x/lib/cocos2d-x/tools/tolua++','E:/quick-cocos2d-x/lib/cocos2dx_extensions_luabinding','E:/quick-cocos2d-x/lib/cocos2dx_extra/build_luabinding'); | |
my @dirs = ('/Volumes/hd2/code_source/quick-cocos2d-x/framework'); | |
my @tolua_dirs = ('/Volumes/hd2/code_source/quick-cocos2d-x/bin/mac/tolua++','/Volumes/hd2/code_source/quick-cocos2d-x/lib/luabinding'); | |
my $rh_parsed = {}; | |
my $library = "quick-lua"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Workaround for Unity game slowing in iPhone4 + 7.1 | |
//Write in main.mm | |
#include <pthread.h> | |
#include <dlfcn.h> | |
typedef int (*pthread_create_f)(pthread_t * __restrict, const pthread_attr_t * __restrict, void *(*)(void *), void * __restrict); | |
static pthread_create_f real_create = NULL; | |
extern "C" int pthread_create(pthread_t * __restrict thread, const pthread_attr_t * __restrict attr, void *(*start)(void *), void * __restrict arg) |
OlderNewer