This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Classe abstrata para funcionalidade de CRUD | |
* @author Daniel Lima <[email protected]> | |
* @example | |
* <code> | |
* <?php | |
* Module_Foo_Controller extexds Cilens_Controller_Crud | |
* { | |
* protected $_modelName = 'Foo'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Git pre-commit hook for Drupal projects. | |
# Created by Dave Hall - http://davehall.com.au | |
# | |
# Changed by Handrus Nogueira and Luiz Petri | |
# | |
# Distributed under the terms of the WTFPL - http://www.wtfpl.net/ | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python2 | |
# Requires: PIL, colormath | |
# | |
# Improved algorithm now automatically crops the image and uses much | |
# better color matching | |
from PIL import Image, ImageChops | |
from colormath.color_objects import RGBColor | |
import argparse | |
import math |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @method: PubSub | |
* */ | |
;(function(global) { | |
'use strict'; | |
function PubSub () { | |
this.topics = {}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// jQuery plugin to prevent double click | |
jQuery.fn.preventDoubleClick = function() { | |
$(this).on('click', function(e){ | |
var $el = $(this); | |
if($el.data('clicked')){ | |
// Previously clicked, stop actions | |
e.preventDefault(); | |
e.stopPropagation(); | |
}else{ | |
// Mark to ignore next click |