Skip to content

Instantly share code, notes, and snippets.

View poksme's full-sized avatar
:atom:
Missing Atom already

Bertrand Boustany poksme

:atom:
Missing Atom already
View GitHub Profile
@poksme
poksme / gulpfile.js
Created February 2, 2016 03:50
Create static files from Jade, Markdown & Less then serve them and livereload via a Gulp workflow
/* global __filename */
var gulp = require('gulp');
var jade = require('gulp-jade');
var less = require('gulp-less');
var serve = require('gulp-serve');
var open = require('gulp-open');
var livereload = require('gulp-livereload');
gulp.task('build-templates', function() {
var locals = {};
@poksme
poksme / gist:5262659
Created March 28, 2013 12:09
How to make a singleton in javascript
function MySingletonObject() {
// SINGLETON CONSTRUCTOR
if (MySingletonObject.prototype._singletonInstance) {
return MySingletonObject.prototype._singletonInstance;
}
MySingletonObject.prototype._singletonInstance = this;
//
// OBJECT PROPERTIES
this.PublicProperty = 42;