Skip to content

Instantly share code, notes, and snippets.

@milmazz
milmazz / .gitconfig
Created Apr 6, 2010
Configuration files for Git
View .gitconfig
[user]
name = Milton Mazzarri
email = milmazz@gmail.com
[diff]
external = gitdiff
[pager]
diff =
[color]
status = auto
branch = auto
@milmazz
milmazz / Gruntfile.js
Last active Aug 29, 2015
Grunt: The Javascript Task Manager
View Gruntfile.js
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jsdoc : {
dist : {
src: ['src/*.js', 'test/*.js'],
dest: 'doc'
}
@milmazz
milmazz / final.js
Last active Aug 29, 2015
DRY principle
View final.js
// Before:
// CallBacks.loadJsonView(url, "POST", Historicals.UpdateCombo, params);
// After:
$.post(url, params, Historicals.UpdateCombo, "json");
// Before:
// CallBacks.loadPartialView(url, "POST", infoDialog, params);
// After:
$.post(url, params, infoDialog, "html");