Skip to content

Instantly share code, notes, and snippets.

View spin6lock's full-sized avatar

John Luk spin6lock

View GitHub Profile
@spin6lock
spin6lock / xcode_compile_error.log
Created May 29, 2013 02:40
quick-cocos2dx LuaHostMac compile error
This file has been truncated, but you can view the full file.
Build Preparation
Dependency cycle for target 'LuaHostMac' detected: LuaHostMac -> LuaHostMac
Build target libquickcocos2dx
ProcessPCH /Users/MobileGame/Library/Developer/Xcode/DerivedData/LuaHostMac-certifysiadpjhbqxeskvaiuofpk/Build/Intermediates/PrecompiledHeaders/libquickcocos2dx-ambgnlepjrpfnzgpszalouayuxqz/libquickcocos2dx.pch.pth libquickcocos2dx.pch normal i386 c com.apple.compilers.llvm.clang.1_0.compiler
cd /Users/MobileGame/Work/quick-cocos2d-x/lib/proj.mac
@spin6lock
spin6lock / gist:62fa67397ba5049b78bb
Created September 1, 2014 11:50
A simple echo server
#!/usr/bin/env python
"""
A simple echo server
"""
import socket
host = ''
port = 50000
@spin6lock
spin6lock / xml_diff.lua
Created November 20, 2017 08:31 — forked from luxuia/xml_diff.lua
xml_diff
#! /usr/bin/env lua
--1. git config diff.xml_diff.textconv xml_diff.lua
---- file: .git/config
---- [diff "xml_diff"]
---- textconv = xml_diff.lua
--2. file: .gitattributes]
---- *.xml diff=xml_diff
@spin6lock
spin6lock / xls2lua_pool.diff
Created August 13, 2018 09:16
xls2lua_pool_vs_xls2lua
diff xls2lua_pool.py xls2lua.py !10017
20,21d19
< from multiprocessing import Pool
< from functools import partial
773,774d770
< def wrap_conv_xls(args, file_names_):
< convet_xls_file(args[0], args[1], file_names_=file_names_)
809,811d804
< p = Pool(8)
<
local list = {}
local v_map = {}
local count = 20
math.randomseed(os.time())
local function gen_data()
for i=1,count do
local r = math.random(1, 100)
list[i] = {objid=r}
v_map[r] = r