I hereby claim:
- I am tyler-johnson on github.
- I am tylerj (https://keybase.io/tylerj) on keybase.
- I have a public key ASCZWe4aI5q2MQsuqyVrPkWrGrZT2bqEnIhJXU1kSCqdRQo
To claim this, I am signing this object:
// DEPENDENCIES | |
var path = require('path'), | |
fs = require('fs'), | |
watch = require('watch'), | |
Handlebars = require('handlebars'), | |
glob = require("glob"), | |
_ = require('underscore'); | |
// MAIN VARS | |
var exts = [ ".hbs" ], |
<!DOCTYPE html> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>Page Title</title> | |
<link rel="stylesheet" href="" type="text/css" /> | |
</head> |
// Slower, larger source, produces a 9 character string | |
var uniqueId = (function() { | |
var ALPHA_NUMERIC = ["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"]; | |
function toAlphaNumeric(n) { | |
var len = ALPHA_NUMERIC.length, | |
digits = ""; | |
while (n !== 0) { | |
var r = n % len; |
(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["./views/question.html"] = (function() {function root(env, context, frame, runtime, cb) { | |
var lineno = null; | |
var colno = null; | |
var output = ""; | |
try { | |
env.getTemplate("layout.html", true, function(t_2,parentTemplate) { | |
if(t_2) { cb(t_2); return; } | |
for(var t_1 in parentTemplate.blocks) { | |
context.addBlock(t_1, parentTemplate.blocks[t_1]); | |
} |
#!/bin/bash | |
echo "" | |
# download the latest version of bootstrap | |
echo "Downloading Bootstrap..." | |
curl -L# -o bootstrap.tar.gz https://github.com/twbs/bootstrap/archive/v3.3.2.tar.gz | |
mkdir bootstrap | |
tar -xf bootstrap.tar.gz -C bootstrap --strip-components 1 | |
cp -R bootstrap/less/ less/ |
function asyncWait(onEmpty) { | |
var counter = 0; | |
setTimeout(callback(), 0); | |
return callback; | |
function callback(cb) { | |
var called = false; | |
++counter; | |
return function() { |
I hereby claim:
To claim this, I am signing this object:
function asyncWhile(condition, action, ctx) { | |
var whilst = function(data) { | |
return condition.call(ctx, data) ? | |
Promise.resolve(action.call(ctx, data)).then(whilst) : | |
data; | |
} | |
return whilst(); | |
} |
Simple Browserify middleware for Express with basic in-memory caching and watchify support.
I created this as a Gist instead of Node module because Browserify bundles are one of those things better left customizable. This function, as it stands, is very limited. It has no support for things like transforms and plugins. Copy this into your app and add any desired functionality there.
Depends on:
require
statement if not desired.var transitionEndEventName = (function() { | |
var i, | |
undefined, | |
el = document.createElement('div'), | |
transitions = { | |
'transition':'transitionend', | |
'OTransition':'otransitionend', // oTransitionEnd in very old Opera | |
'MozTransition':'transitionend', | |
'WebkitTransition':'webkitTransitionEnd' | |
}; |