Skip to content

Instantly share code, notes, and snippets.

View mklabs's full-sized avatar

Mickael Daniel mklabs

View GitHub Profile
@mklabs
mklabs / app.js
Created November 14, 2011 15:59
playing with broadway + sugarskull cli mode
// app.js - core application object extending broadway.App, overriding some of these methods.
var fs = require('fs'),
path = require('path'),
util = require('util'),
broadway = require('broadway');
var App = exports.App = function (options) {
broadway.App.call(this, options);
};
@mklabs
mklabs / logger.js
Created November 8, 2011 20:35
minilog
var util = require('util');
var levels = [
'error',
'warn',
'info',
'log',
'debug'
];
@mklabs
mklabs / bash
Created November 1, 2011 21:50
docs simple as cake
#!/bin/bash
# this script install itself (npm package), create a tasks/docs.js, install the docs' task dependencies,
# and run the gh-pages task.
#
# Install:
#
# curl https://raw.github.com/gist/1332036/70f8f3f9b85082569aff7f10773fc40e2fd7388d/bash | sh
#
# It'll generate documentation based on the likely location of
@mklabs
mklabs / Cakefile
Created November 1, 2011 21:41
Cake bin wrapper - load cake tasks from tasks/ dir
fs = require 'fs'
path = require 'path'
{EventEmitter} = require 'events'
colors = require 'colors'
# ### Options
# Options are handled using coffeescript optparser,
# You can define the option with short and long flags,
# and it will be made available in the options object.
@mklabs
mklabs / index.html
Created November 1, 2011 11:08
build script experiment - data attributes
<!doctype html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
@mklabs
mklabs / index.html
Created November 1, 2011 11:06
build script experiment - html comments
* index: https://raw.github.com/mklabs/h5bp-build-script-tags/master/index.html
* result: https://raw.github.com/mklabs/h5bp-build-script-tags/master/intermediate/index.html
@mklabs
mklabs / npm-clean.js
Created October 21, 2011 13:07
npm script to automatically uninstall globally installed packages
var npm = require('npm');
// simple npm script to automatically uninstall globally installed package
//
// Usage: [sudo] node npm-clean.js
// Or, maybe: npm start
//
// edit protecteds array below to disable uninstall on these packages
@mklabs
mklabs / helpers.js
Created October 14, 2011 16:00
log helpers
var globalize = require('globalize'),
_ = require('underscore'),
eyes = require('eyes'),
conf = require('./conf')(module),
output = conf.get('path'),
formats = conf.get('format'),
defaults = formats.defaults;
var helpers = exports;
@mklabs
mklabs / .gitignore
Created October 9, 2011 15:17
datauri / mhtml script experiment
node_modules
# folders used for testing
css
img
images
test
@mklabs
mklabs / base64
Created October 3, 2011 20:56
data URIs for web content quick and easy
#!/usr/bin/env node
//
// small program/library to make creation of data URIs for web content quick and easy
//
// ./base64 ../path/to/some/file.png | pbcopy
//
// may ends up in a tool to embed data URIs in HTML/CSS files.
//
// inspired by https://github.com/nzakas/cssembed