Skip to content

Instantly share code, notes, and snippets.

/* apply a natural box layout model to all elements */
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@smonn
smonn / startdev.js
Last active December 13, 2015 18:08
This is my little play script written in Node.js. I use it to fetch the latest changes from the version control system and build the project(s) I'm working on. Consider it a Makefile written in JavaScript. Probably not entirely necessary, but I find it useful and more fun to maintain than a shell script.
/*jshint node: true */
'use strict';
var exec = require('child_process').exec,
fs = require('fs'),
cwd = 'C:\\working\\directory',
env = {
'PATH': 'C:\\Windows\\System32\\;'
},
commands = {
'command name': 'command-line --with-params'
@LeverOne
LeverOne / LICENSE.txt
Created October 24, 2011 04:17 — forked from jed/LICENSE.txt
generate random v4 UUIDs (107 bytes)
DO WTF YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Alexey Silin <[email protected]>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WTF YOU WANT TO PUBLIC LICENSE
@ryanflorence
ryanflorence / universal-module.js
Created September 6, 2011 18:10
Universal JavaScript Module, supports AMD (RequireJS), Node.js, and the browser.
(function (name, definition){
if (typeof define === 'function'){ // AMD
define(definition);
} else if (typeof module !== 'undefined' && module.exports) { // Node.js
module.exports = definition();
} else { // Browser
var theModule = definition(), global = this, old = global[name];
theModule.noConflict = function () {
global[name] = old;
return theModule;