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/sh | |
# svn utils | |
# Author: Allex Wang ([email protected]) | |
# GistID: | |
dir=`pwd` | |
source=$dir | |
cmd=$1 | |
name=$2 |
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
# .bashrc | |
# Author: Allex Wang ([email protected]) | |
# GistID: 317f2b8bca35ee951a8f | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi |
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/sh | |
# Toolkit script for git repos build and distribute release. | |
# Author: Allex Wang ([email protected]) | |
# GistID: fbe05460d1f4005047ad | |
dir=`cd $(dirname $0); pwd -P` | |
source=$dir/source | |
[ -d $source ] || { echo >&2 "source dir not exists." && exit 404; } |
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/sh | |
# Auto cleanup expried log files. | |
# Author: Allex Wang ([email protected]) | |
# GistID: c487d6d8b2b52219a87b | |
# GistURL: https://gist.github.com/c487d6d8b2b52219a87b | |
log_dir=$1 # log files directory | |
expired_days=7 # log file expried days |
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
<?php | |
/** | |
* Simple git hooks handler for web automate deployment. | |
* | |
* @author Allex Wang ([email protected]) | |
* Last Modified: Wed Dec 24, 2014 03:49PM | |
* GistID: 433fa22c0af8be914c44 | |
* GistURL: https://gist.github.com/433fa22c0af8be914c44 | |
*/ |
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
/** | |
* Requires node v0.7.7 or greater. | |
* | |
* To connect: $ curl -sSNT. localhost:8000 | |
*/ | |
var http = require('http') | |
, repl = require('repl') | |
, buf0 = new Buffer([0]) |
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
// GistID: 5dbaca696a4a95efa3d7 | |
// GistURL: https://gist.github.com/allex/5dbaca696a4a95efa3d7 | |
// @ref <https://raw.githubusercontent.com/umdjs/umd/master/returnExports.js> | |
// Uses Node, AMD or browser globals to create a module. | |
// If you want something that will work in other stricter CommonJS environments, | |
// or if you need to create a circular dependency, see commonJsStrict.js | |
// Defines a module "returnExports" that depends another module called "b". |
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
/* | |
Compass common consts and functions | |
@author Allex Wang ([email protected]) | |
GistID: cc7227ac20bdf14f4613 | |
GistURL: https://gist.github.com/allex/cc7227ac20bdf14f4613 | |
*/ | |
@import "compass/css3"; | |
@import "compass/utilities"; |
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
# Extends with specified shortcut completion with host prefix and default user | |
# Author: Allex Wang ([email protected]) | |
# MIT Licensed | |
# GistID: 0f844bbe583a1e40548d | |
# GistURL: https://gist.github.com/allex/0f844bbe583a1e40548d | |
ssh() { | |
local user= | |
local host=$1 | |
local m=`grep -Po '\w+@\w+' <<< "$host"` | |
if [ "$m" ]; then |
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/sh | |
# Usage: pngcrush.sh <src_dir> [out_dir] | |
# | |
# GistID: bb5f758dba3ae18176b4 | |
# GistURL: https://gist.github.com/bb5f758dba3ae18176b4 | |
# Author: Allex Wang ([email protected]) | |
input="${1%/}" | |
out="${2%/}" |