Skip to content

Instantly share code, notes, and snippets.

View handrus's full-sized avatar

Handrus Stephan Nogueira handrus

View GitHub Profile
@handrus
handrus / .htaccess
Created May 21, 2013 16:15
htacess tuned for better performance. Tested with yslow and pagespeed
<IfModule mod_expires.c>
# Enable the module
ExpiresActive On
# Default expiration of 2 weeks
ExpiresDefault A1209600
# Expire CSS, JS and images content after 1 day.
ExpiresByType text/css "access plus 1 day"
ExpiresBytype text/javascript "access plus 1 day"
@handrus
handrus / php_zip.inc
Created April 11, 2012 16:27
Zip files on php without ZIP library
<?php
// $Id$
/**
* @file
* Zip class for servers without ziplib.
*/
class PHPZip {
function Zip($dir, $zipfilename) {
if (@function_exists('gzcompress')) {
@handrus
handrus / Crud.php
Created December 2, 2011 16:43
Classe abstrata de crud
<?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';