Skip to content

Instantly share code, notes, and snippets.

@2no
2no / gist:3824817
Created October 3, 2012 03:27
Grunt で js を minify して gzip 圧縮
// 個別で js を minify して gzip したかったので、こんな感じになった
// ファイル名などにスペースが入ってた時どうするのか
module.exports = function(grunt) {
'use strict';
var src = 'shared/js/*.js',
files = grunt.file.expandFiles(src),
suffix = '.min',
minFiles = {},
gzFiles = {};
@meltingice
meltingice / singleton.coffee
Created May 18, 2011 19:55
Example singleton class and example for Coffeescript
class Singleton
# We can make private variables!
instance = null
# Static singleton retriever/loader
@get: ->
if not @instance?
instance = new @
instance.init()