Skip to content

Instantly share code, notes, and snippets.

View pbouzakis's full-sized avatar

Paul Bouzakis pbouzakis

View GitHub Profile
@kana
kana / lazy.js
Created April 9, 2013 09:57
Lazy evaluation in JavaScript
function delay(expressionAsFunction) {
var result;
var isEvaluated = false;
return function () {
if (!isEvaluated)
result = expressionAsFunction();
return result;
};
}
@cborgolte
cborgolte / browser
Created October 31, 2012 11:56 — forked from defunkt/browser
pipe html to a browser (linux/gnome version)
#!/bin/sh -e
#
# Usage: browser
# pipe html to a browser
# e.g.
# $ echo '<h1>hi mom!</h1>' | browser
# $ ron -5 man/rip.5.ron | browser
if [ -t 0 ]; then
if [ -n "$1" ]; then
@puffnfresh
puffnfresh / do.sjs
Created October 4, 2012 04:40
do-notation using sweet.js
macro $do {
case { $y:expr } => {
$y
}
case { $x:ident <- $y:expr $rest ... } => {
λ['>=']($y, function($x) {
return $do { $rest ... }
});
}
}
@kraz
kraz / make.bat
Last active March 13, 2019 16:52
Windows batch for simulating twitter bootstrap make functionality
@echo off
SET BOOTSTRAP=.\docs\assets\css\bootstrap.css
SET BOOTSTRAP_LESS=.\less\bootstrap.less
SET BOOTSTRAP_RESPONSIVE=.\docs\assets\css\bootstrap-responsive.css
SET BOOTSTRAP_RESPONSIVE_LESS=.\less\responsive.less
SET "CHECK= "
SET HR=##################################################
::Try to use the local build tools, if installed instead of global ones