Skip to content

Instantly share code, notes, and snippets.

View zilongshanren's full-sized avatar
🎯
Focusing

子龙山人 zilongshanren

🎯
Focusing
View GitHub Profile
@zilongshanren
zilongshanren / 抽奖送书
Last active December 15, 2015 06:59
《Cocos2D权威指南》送书脚本
import csv
from random import randint
import sys
#determin whether args is legal or not
#抽奖文件名
filename = sys.argv[1]
#中奖序列号起始值
startNum = int(sys.argv[2])
#中奖序列号结束值
@zilongshanren
zilongshanren / cocos2dx-android-mk
Last active April 1, 2017 04:56
Android Makefile , support box2d
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := game_shared
LOCAL_MODULE_FILENAME := libgame
#traverse all the directory and subdirectory
define walk
@zilongshanren
zilongshanren / tp-cml-scripts
Last active December 20, 2015 03:59
TexturePack command line scripts for cocos2d-x
#!/bin/sh
# PackTexture.sh
#
# Created by Guanghui Qu on 13-3-19.
TP="/usr/local/bin/TexturePacker"
# create spritesheet
@zilongshanren
zilongshanren / GD-cmd-scripts
Created July 24, 2013 02:05
GlyphDesigner command line tools for cocos2d-x game developer
#!/bin/sh
GD="/usr/local/bin/GDCL"
${GD} ../heightFont.GlyphProject Resources/HD/height
${GD} ../heightFont.GlyphProject Resources/SD/height -fs 16
@zilongshanren
zilongshanren / CentOS安装git服务器
Last active December 20, 2015 05:09
CentOS安装git服务器
教程:http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way/
http://www.cnblogs.com/ahauzyy/archive/2013/04/08/3043384.html
http://blog.haohtml.com/archives/12658
http://blog.csdn.net/sheismylife/article/details/7204345
错误1 :
PTY allocation request failed on channel 0
ERROR:gitosis.serve.main:Need SSH_ORIGINAL_COMMAND in environment.
@zilongshanren
zilongshanren / ubuntu安装vim7.4
Last active December 20, 2015 17:59
ubuntu安装vim
sudo add-apt-repository ppa:fcwu-tw/ppa
sudo apt-get update
sudo apt-get install vim
Reference:
http://linuxg.net/how-to-install-vim-7-4-on-ubuntu-13-10-13-04-12-04-linux-mint-16-15-13-and-debian-sid/
@zilongshanren
zilongshanren / .ycm_extra_conf.py
Last active April 8, 2016 02:47 — forked from jassinm/.ycm_extra_conf.py
ycm vim plugin configs
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
@zilongshanren
zilongshanren / batchResizeFile
Last active December 21, 2015 17:19
use imagemagick to batch resizing png files
mogrify -resize 40% -path outputpath *.png
@zilongshanren
zilongshanren / 查看你经常使用到的命令
Last active December 22, 2015 17:38
查看你经常使用到的命令
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c4 -s " " -t | sort -nr | nl | head -n10
@zilongshanren
zilongshanren / xcode xvim插件
Last active December 22, 2015 19:19
xcode使用
1.使用Xvim插件,提供vim体验
2.使用svn的时候会莫名其妙地退出。
http://stackoverflow.com/questions/12583725/xcode-4-5-quit-unexpectedly
3.