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 | |
# Allex personal .bash_local | |
# GistID: e50cd4685e9e75e607da | |
# GistURL: https://gist.github.com/e50cd4685e9e75e607da | |
clearlog() { | |
t="$1" | |
[ -z "$t" ] && exit 0; | |
if [ -f "$t" ]; 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/bash | |
# apt-cyg: install tool for cygwin similar to debian apt-get | |
# | |
# Copyright (C) 2005-9, Stephen Jungels | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. |
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 json combine script | |
// author: Allex Wang ([email protected]) | |
// GistID: dbd77fbed7a0519f07f7 | |
// GistURL: https://gist.github.com/allex/dbd77fbed7a0519f07f7 | |
define('DATA_DIR', dirname(__FILENAME__) . DIRECTORY_SEPARATOR . "data"); | |
function merge_files($list) { |
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 | |
/** | |
* Deploy publish server for build-client | |
* | |
* @author Allex Wang ([email protected]) | |
* GistID: 5c8853045085d8daca68 | |
* GistURL: https://gist.github.com/5c8853045085d8daca68 | |
*/ |
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 | |
# ============================================================ | |
# Description: F2E static resource release script | |
# Last Modified: Fri Dec 26, 2014 03:27PM | |
# Author: Allex Wang ([email protected]) | |
# GistID: 14e37a9a55e16f89efb9 | |
# GistURL: https://gist.github.com/allex/14e37a9a55e16f89efb9 | |
# ============================================================ |
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 | |
# =========================================================== | |
# Description: Package remote git && svn repos project. | |
# Last Modified: Wed Mar 23, 2016 09:40AM | |
# Author: Allex Wang ([email protected]) | |
# GistID: c833503674aa93878575 | |
# GistURL: https://gist.github.com/allex/c833503674aa93878575 | |
# ============================================================ |
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
// Fullscreen | |
// GistID: 46cbd582386c535976a4 | |
function() { | |
var e = function(e, t) { | |
return function() { return e.apply(t, arguments) } | |
}; | |
exports.Fullscreen = function() { | |
function t(t) { | |
this.$el = t, this.toggleState = e(this.toggleState, this), this.toggle = e(this.toggle, this), this.el = this.$el[0], this.$el.find(".js-fullscreen-toggle").on("click", this.toggle), this.$(document).on("fullscreenchange webkitfullscreenchange mozfullscreenchange", this.toggleState), this.supported() && this.$el.addClass("fullscreen-supported") | |
} |
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 | |
# git hook for auto upload current package to npm server | |
# author: Allex Wang (http://iallex.com) | |
# GistID: ea4a4cee2278d5b0fccd | |
# GistURL: http://gist.github.com/allex/ea4a4cee2278d5b0fccd | |
npm_server="server.npm" | |
npm_root="/data/npm" |
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
/** | |
* A simple proxy for http request forwoads. | |
* | |
* @author Allex Wang ([email protected]) | |
*/ | |
var http = require('http') | |
, util = require('util') | |
, request = require('request') |
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 | |
txtrst=$(tput sgr0) | |
txtred=$(tput setaf 1) | |
read -p "${txtred}Do you really wanna refresh static5 resources? [y|n]${txtrst} " y | |
if [ "$y" = "y" ]; then | |
echo "Update static5 resources..." | |
curl http://fe.bubugao-inc.com/deploy/update/public,mall,bc,uc,help | |
else |