Skip to content

Instantly share code, notes, and snippets.

View evocateur's full-sized avatar

Daniel Stockman evocateur

View GitHub Profile
@evocateur
evocateur / README.md
Created March 6, 2014 19:44 — forked from caridy/README.md
YUI Locator

What is this?

This is a script that you can add to your application to generating yui meta data and compiling yui modules using express-yui and locator. As a result, a build folder will be generated with everything that was compiled.

How does this work?

Locator walks the folder structure for your app, and finds any yui module, including build.json or just traditional *.js files with the corresponding YUI.add() statement. Generating the result of the operation as well as the metadata associated to each module.

Under the hood, it uses shifter to generate almost everything that is needed.

@evocateur
evocateur / mvncolor.sh
Last active August 29, 2015 14:00 — forked from dant3/mvncolor.sh
Add color to Maven output
#!/usr/bin/env bash
# Formatting constants
BOLD=`tput bold`
UNDERLINE_ON=`tput smul`
UNDERLINE_OFF=`tput rmul`
TEXT_BLACK=`tput setaf 0`
TEXT_RED=`tput setaf 1`
TEXT_GREEN=`tput setaf 2`
TEXT_YELLOW=`tput setaf 3`
@evocateur
evocateur / promise-each.js
Last active August 29, 2015 14:02
Y.Promise.each
YUI.add('promise-each', function (Y) {
function isArray(obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
}
function isFunction(obj) {
return obj && (typeof obj === 'function');
}
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@evocateur
evocateur / gist:5531
Created August 15, 2008 03:39
my ~/.profile
# my ~/.profile
# somewhat mac-specific, lots of git aliases
# functionName () { do something $@<-arguments ; }
function ls { command ls -1AGp "$@"; }
# 'command ls' to prevent loop; -A for .file, -F for dir/ link@,
# -h for 5k 3m 1g, -o for printing flags (uchg)...
function l { ls -lhog "$@"; } # -l to list in long format...
function ll { ls -lF "$@" | less -XF ; } # pipe into 'more'
var escapeHTML = function(s) {
return s.replace(
/([<>&""''])/g,
function(m, c) {
switch(c) {
case "<": return "&lt;";
case ">": return "&gt;";
case "&": return "&amp;";
case '"': return "&quot;";
case "'": return "&apos;";
@evocateur
evocateur / install_node-v0.4.12.sh
Created December 20, 2011 01:36
A script to install nodejs v0.4.12 on Ubuntu
#!/bin/sh
apt-get -y update
apt-get -y install libssl-dev git-core pkg-config build-essential curl gcc g++
mkdir /tmp/node-install
cd /tmp/node-install
wget http://nodejs.org/dist/node-v0.4.12.tar.gz
tar -zxf node-v0.4.12.tar.gz
YUI.add('node-scroll-info', function (Y) {
/**
Provides the ScrollInfo Node plugin, which exposes convenient events and methods
related to scrolling.
@module node-scroll-info
**/
/**
@evocateur
evocateur / z-aliased-attr-test.html
Created November 6, 2012 18:57
Aliased Attribute Extension
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="ie ie8" lang="en"> <![endif]-->
<!--[if gte IE 9]> <html class="ie" lang="en"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>z-aliased-attr Test Suite</title>
@evocateur
evocateur / gist:5017874
Last active December 14, 2015 02:59 — forked from ericf/gist:5015971
A script to include or exclude YUI modules based on their node.js compatibility.
#!/usr/bin/env node
var fs = require('fs'),
path = require('path'),
yui_module = process.argv[2] ? path.join(process.cwd(), process.argv[2]) : 'yui',
output = process.argv[3],
EXCLUDE_FILTERS = [
/^cookie/,