Skip to content

Instantly share code, notes, and snippets.

View mklabs's full-sized avatar

Mickael Daniel mklabs

View GitHub Profile
@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@mklabs
mklabs / pre-commit
Created November 15, 2011 17:28
run jshint as git/hg hooks, NO COMMIT IF NO LINT FREE.
#!/usr/bin/env node
// todo: try to require jshint here, instead of spawning process, then fallback to spawning process.
var jshint = nrequire('jshint');
if (jshint) return process.exit(0);
// jshint not installed locally, spawn process instead.
// basically the same, but less pretty.
var exec = require('child_process').exec;
@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;