Skip to content

Instantly share code, notes, and snippets.

View zrong's full-sized avatar
🏠
Working from home

Jacky zrong

🏠
Working from home
View GitHub Profile
@zrong
zrong / 660-init-deb.sh
Last active August 29, 2015 14:11
nginx start script for CentOS an Ubuntu
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
#!/bin/sh
#
# redis - this script starts and stops the redis-server daemon
#
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/redis/redis.pid
@zrong
zrong / annual_gift_lottery.lua
Last active August 29, 2015 14:13
Using: host/gift/yourname
#!/usr/bin/lua
-- Using:
-- Deploy this file to openresty
-- and visit host/gift/yourname.
-- E.g http://192.168.18.22/gift/zengrong
-- Will get a gift object for zengrong.
function in_table(t, v)
for key,value in pairs(t) do
if type(value) == 'table' then
@zrong
zrong / build.properties
Created May 5, 2011 13:47
同项目中编译多个主文件,使用ant tagetname实现调用
# 设置FLEX SDK的路径
FLEX_HOME=c:/Program Files/Adobe/FlashBuilder4Plug-in/sdks/4.1.0
# 设置源文件路径
# {$basedir} 就是本文件所在的目录
SRC_DIR =${basedir}/src
# libs目录,一般用来放swc文件
LIBS_DIR =${basedir}/libs
@zrong
zrong / build.properties
Created May 6, 2011 10:02
使用Fcsh Server
# 设置FLEX SDK的路径
FLEX_HOME=D:/flex_sdks/4.1.0
# 设置源文件路径
# {$basedir} 就是本文件所在的目录
SRC_DIR =${basedir}/src
# libs目录,一般用来放swc文件
LIBS_DIR =${basedir}/libs
@zrong
zrong / build.properties
Created June 21, 2011 07:41
使用Fcsh Server,并传递参数
# 设置FLEX SDK的路径
FLEX_HOME=D:/flex_sdks/4.5.0
# 设置源文件路径
# {$basedir} 就是本文件所在的目录
SRC_DIR =${basedir}/src
# libs目录,一般用来放swc文件
LIBS_DIR =${basedir}/libs
@zrong
zrong / build.properties
Created August 10, 2011 13:44
使用target來控制部署路徑
# 设置FLEX SDK的路径
FLEX_HOME=d:/flex_sdks/4.5.0
# 设置源文件路径
# {$basedir} 就是本文件所在的目录
SRC_DIR =${basedir}/src
# libs目录,一般用来放swc文件
LIBS_DIR =${basedir}/libs
@zrong
zrong / PList.as
Created September 13, 2013 08:40 — forked from comfuture/PList.as
package maroo.codec
{
import flash.utils.ByteArray;
import mx.utils.Base64Decoder;
public class PList
{
public static function parse(source:XML):Object
{
switch (source.name().localName) {
@zrong
zrong / build.properties
Created April 27, 2011 17:12
ant编译swf的选项(mxmlc的简单编译)
# 设置FLEX SDK的路径
FLEX_HOME=c:/Program Files/Adobe/FlashBuilder4Plug-in/sdks/4.1.0
# 设置源文件路径
# {$basedir} 就是本文件所在的目录
SRC_DIR =${basedir}/src
# libs目录,一般用来放swc文件
LIBS_DIR =${basedir}/libs
@zrong
zrong / pure-ftpd.sh
Last active April 27, 2016 09:46
pure-ftpd init script for centos
#!/bin/bash
#
# Startup script for the pure-ftpd FTP Server $Revision: 1.1 $
#
# chkconfig: - 85 15
# description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd
# processname: pure-ftpd
# pidfile: /var/run/pure-ftpd.pid
# config: /etc/pure-ftpd/pure-ftpd.conf