Skip to content

Instantly share code, notes, and snippets.

#!/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
@allex
allex / apt-cyg
Last active August 29, 2015 14:06
#!/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.
<?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) {
<?php
/**
* Deploy publish server for build-client
*
* @author Allex Wang ([email protected])
* GistID: 5c8853045085d8daca68
* GistURL: https://gist.github.com/5c8853045085d8daca68
*/
#!/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
# ============================================================
#!/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
# ============================================================
// 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")
}
#!/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"
/**
* A simple proxy for http request forwoads.
*
* @author Allex Wang ([email protected])
*/
var http = require('http')
, util = require('util')
, request = require('request')
#!/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