This file contains 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
/* | |
** Execute given `func`tion no more often than once every `delay` milliseconds, | |
** queue all calls, do not drop anything (unlike throttle and debounce) | |
** | |
** Example usage: | |
** rateLimitedFunc = rateLimit(function (i) { console.log(i) }, 500) | |
** for (var i=0; i < 10; i++) rateLimitedFunc(i) | |
*/ | |
function rateLimit(func, delay) { | |
var queue = [], |
This file contains 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
from fabric.api import local | |
import sys, os, webbrowser, jinja2 | |
BASE_PATH = sys.path[0] | |
SRC_PATH = os.path.join(BASE_PATH, 'src') | |
BUILD_PATH = os.path.join(BASE_PATH, 'build') | |
JINJA_ENV = jinja2.Environment(loader=jinja2.FileSystemLoader(SRC_PATH)) | |
NewerOlder