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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Convert a GUI only vim colorscheme file to a gui/256xterm | |
# compatible version | |
# Author: Allex Wang (http://iallex.com) | |
# GistID: 47289e9f5a90019ea2c5 | |
# GistURL: https://gist.github.com/allex/47289e9f5a90019ea2c5 | |
colortable = \ |
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: Run compass watch in background | |
# GistID: 965f3e1a0876592db33f | |
# GistURL https://gist.github.com/allex/965f3e1a0876592db33f | |
# Author: Allex Wang ([email protected]) | |
# Last Modified: Tue Dec 09, 2014 12:12PM | |
# ================================================ |
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 -e | |
# ================================================ | |
# Description: mysql local - remote sync tool | |
# Last Modified: Tue Aug 05, 2014 11:52PM | |
# Author: Allex Wang ([email protected]) | |
# GistID: 7d9df0743deb78278761 | |
# GistURL: https://gist.github.com/allex/7d9df0743deb78278761 | |
# ================================================ |
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
// Author: Allex Wang ([email protected]) | |
// GistID: 9b821248c36787ba66c0 | |
// GistURL: https://gist.github.com/9b821248c36787ba66c0 | |
// refer to: http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/ | |
function bitwise(str) { | |
var hash = 0; | |
if (str.length == 0) return hash; | |
for (var i = 0; i < str.length; i++) { | |
var ch = str.charCodeAt(i); |
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 | |
// Author: Allex Wang (http://iallex.com) | |
// GistID: 1ec4083d5c3321ceb96a | |
// GistURL: https://gist.github.com/1ec4083d5c3321ceb96a | |
function shorturl($input) { | |
$base32 = array( | |
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', | |
'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', |
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: 7ffada0ea2589112f3f3 | |
[global] | |
pid = /home/work/php/var/run/php-fpm.pid | |
log_level = error | |
emergency_restart_threshold = 10 | |
emergency_restart_interval = 1m | |
process_control_timeout = 5s | |
daemonize = yes | |
error_log = /home/work/php/logs/php/php-fpm.log | |
[www] |
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
@mixin background_image ($filename) { | |
background-image: image-url(1x/#{$filename}); | |
@media only screen and (-webkit-min-device-pixel-ratio: 1.5), | |
only screen and (-o-min-device-pixel-ratio: 3/2), | |
only screen and (min--moz-device-pixel-ratio: 1.5), | |
only screen and (min-device-pixel-ratio: 1.5) { | |
background-image: image-url(2x/#{$filename}); | |
} | |
} |
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
/* | |
Animation utils mixin definations. | |
@author Allex Wang (http://iallex.com) | |
GistID: fd9ed2f65b614e0888d9 | |
GistURL: https://gist.github.com/fd9ed2f65b614e0888d9 | |
*/ | |
// See also: https://gist.github.com/allex/78b5b5603baec38af45e | |
@import "inc"; |
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
// Sass shared include definations | |
// @author Allex Wang (http://iallex.com) | |
// GistID: 78b5b5603baec38af45e | |
// GistURL: https://gist.github.com/78b5b5603baec38af45e | |
@import "compass/css3"; | |
@import "compass/utilities"; | |
@import "compass/css3/transform"; | |
@import "compass/css3/transition"; |
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
/** | |
* name: Cross-browser TextStorage | |
* desc: text storage solution for your pages | |
* copy: sofish, http://sofish.de | |
* GistID: ecb075cfb9f8887845da | |
*/ | |
typeof window.localStorage == 'undefined' && ~function () { | |
var localStorage = window.localStorage = {}, | |
prefix = 'data-userdata', |