Skip to content

Instantly share code, notes, and snippets.

@thgaskell
thgaskell / Gulpfile.js
Created Mar 25, 2014
Creates a mini development environment for serving static content.
View Gulpfile.js
var gulp = require('gulp'),
gutil = require('gulp-util');
var paths = {
css: 'assets/css/**/*.css',
html: 'assets/html/**/*.html',
js: 'assets/js/**/*.js',
img: 'assets/images/**/*.{png,jpg,jpeg,gif}'
};
@thgaskell
thgaskell / Class.js
Created Nov 13, 2013
Mimic Java classes using closures and object properties.
View Class.js
var Class =
// Create a closure with an Immediately-Invoked Function Expression (IIFE)
(function () {
(function _init() {
// Similar to a static initializer in Java
// This is optional, but it prevents polluting the Class scope.
})();
// Private static variable
var _static;