Skip to content

Instantly share code, notes, and snippets.

View marcalj's full-sized avatar

Marçal marcalj

View GitHub Profile
// Generated on 2013-11-22 using generator-angular 0.6.0-rc.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
// Generated on 2013-11-22 using generator-angular 0.6.0-rc.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@marcalj
marcalj / cron.php
Created October 7, 2011 09:46
Kohana: i18n strings generator
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Cron extends Controller {
public function before()
{
// Set default language
I18n::$lang = Kohana::$config->load('i18n.default');
}
@marcalj
marcalj / underscore.compactObject.js
Created July 7, 2011 15:19
compactObject Underscore function
/**
* compactObject
* =============
* Simple port of Underscore Array's compact function. You need to replace _.trim function if underscore.string it's not included.
*/
_.mixin({
compactObject: function(to_clean) {
_.map(to_clean, function(value, key, to_clean) {
if ( !!!value || (_.isString(value) && _.trim(value).length === 0)) {