Skip to content

Instantly share code, notes, and snippets.

View mklabs's full-sized avatar

Mickael Daniel mklabs

View GitHub Profile
@jzaefferer
jzaefferer / rhino suitejs
Created November 30, 2010 20:53
QUnit-CLI with both Rhino and Node.js;
if (typeof require != "undefined") {
// should change export to module.exports = QUnit
QUnit = require("../qunit/qunit.js").QUnit;
print = console.log;
} else {
load("../qunit/qunit.js");
}
var stop_watch = {
@HenrikJoreteg
HenrikJoreteg / nodeconf_2011.md
Created May 6, 2011 18:50 — forked from guybrush/nodeconf_2011.md
a list of slides from nodeconf 2011
function t(s,d,p){for(p in d)s=s.replace(new RegExp('{'+p+'}','g'),d[p]);return s;}
/*
String templating engine:
t("Hello {name}!, It is {date}!", { name: "Thomas", date: function(){ return new Date }});
// = "Hello Thomas!, It is Sun May 08 2011 15:15:33 GMT-0400 (EDT)!"
*/
@creationix
creationix / formatStackTrace.js
Created September 21, 2011 22:29
Beginning of an event-source hook for system-wide stack handling hooks.
// Copyright 2006-2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
@cowboy
cowboy / jquer.ba-wtf-animation.js
Created September 29, 2011 17:07
jQuery: a little WTF text animation :)
// Iterate over a bunch of elements.
$(":header, p, li").each(function() {
// The current element.
var elem = $(this);
// A copy of the current element that will take its place in the DOM during
// the animation.
var copy = elem.clone().replaceAll(elem);
// The element's text content. To be animated, character-by-character.
var text = copy.text();
@mattpodwysocki
mattpodwysocki / jsconf-eu-2011.md
Created October 1, 2011 13:40
JSConf.EU Slides
@indexzero
indexzero / jshint.json
Created October 4, 2011 23:48
JSHint settings used @nodejitsu
{
"passfail": false,
"maxerr": 100,
"browser": true,
"node": true,
"rhino": false,
"couch": true,
"wsh": true,
"jquery": true,
@indexzero
indexzero / opensource-guidelines.md
Created November 9, 2011 01:54
The least amount of guidelines possible to maintain 150+ open source node.js modules

Guidelines for Open Source at Nodejitsu

README.md Outline

  • Header
    • Brief description (should match package.json)
  • Example (if applicable)
  • Motivation (if applicable)
  • API Documentation: This will likely vary considerably from library to library.
  • Installation
@mmalecki
mmalecki / .travis.yml
Created January 7, 2012 01:44
Basic `.travis.yml` you should be using for your project
language: node_js
node_js:
- 0.4
- 0.6
@fat
fat / index.js
Created January 12, 2012 17:43
Bootstrap Build Server
// ========================================================================
// bootstrap-builder v0.1.0
// http://twitter.github.com/bootstrap
// ========================================================================
// Copyright 2011 Twitter, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//