Skip to content

Instantly share code, notes, and snippets.

View fson's full-sized avatar

Ville Immonen fson

View GitHub Profile
@fson
fson / refactoring.md
Created December 12, 2012 19:48 — forked from anonymous/README.md
Meanings of refactoring
  • Martin Fowler: "disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior"
  • Opionated developer: renaming source files
  • Minimalistic developer: removing source files
  • Badass developer: rewriting everything from scratch
  • Technical lead: calls it 'improving' instead, to avoid scaring the management
  • Project manager: fixing previous mistakes
  • Product manager: time when no new features get done
  • CEO: slacking
@fson
fson / slug.js
Created January 4, 2012 17:46 — forked from maccman/slug.js
Hem & Less
var hem = new (require('hem'));
var less = require('less');
var fs = require('fs');
var argv = process.argv.slice(2);
var path = require('path');
var util = require('util');
hem.compilers.less = function (pathname) {
var content, result;
content = fs.readFileSync(pathname, 'utf8');