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 | |
class ImageHelper extends Helper | |
{ | |
var $helpers = array('Html'); | |
var $cacheDir = 'imagecache'; // relative to 'img'.DS | |
/** | |
* Automatically resizes an image and returns formatted IMG tag |
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 | |
// See related links for more status codes | |
// Use this header instruction to fix 404 headers | |
// produced by url rewriting... | |
header('HTTP/1.1 200 OK'); | |
// Page was not found: | |
header('HTTP/1.1 404 Not Found'); |
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 | |
/** | |
* mysql-convert-latin1-to-utf8.php | |
* | |
* v1.2 | |
* | |
* Converts incorrect MySQL latin1 columns to UTF8. | |
* | |
* NOTE: Look for 'TODO's for things you may need to configure. | |
* |
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 | |
header('Cache-Control: no-cache, no-store, max-age=0, must-revalidate'); | |
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past | |
header('Pragma: no-cache'); | |
if (count($_POST) > 0 && !isset($_POST['action'])) { | |
die( "VERIFICADO" ); | |
} |
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 | |
/** | |
* | |
* | |
* @link http://cakephp.org CakePHP(tm) Project | |
* @package app.View.Pages | |
* @since CakePHP(tm) v 0.10.0.1076 | |
*/ | |
if (!Configure::read('debug')): |
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 | |
/** | |
* Remoção dos arquivos das imagens da grade antes de excluir o registro no banco | |
* | |
* @param bool $cascade Parâmetro obrigatório do callback do Model | |
* | |
* @return bool | |
*/ | |
public function afterDelete() | |
{ |
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 | |
// carregaMenuSite() antes do $categoria_route | |
if (in_array('index', $this->params['pass'])) { | |
unset($this->params['pass'][array_search('index', $this->params['pass'])]); | |
$this->params['pass'] = array_merge($this->params['pass']); | |
} |
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
<!doctype html> | |
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ --> | |
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en"> <![endif]--> | |
<!--[if IE 7]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> | |
<!-- Consider adding an manifest.appcache: h5bp.com/d/Offline --> | |
<!--[if gt IE 8]><!--> | |
<html class="no-js" lang="en" > | |
<head> | |
<meta charset="utf-8"> |
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
# Salvar galeria sem as fotos (somente o código-fonte) | |
# Remove "empty" files | |
for i in `find /home/*/public_html/* -type f -name 'empty'`; do rm -f $i; done | |
# Remove error_logs | |
for i in `find /home/*/public_html/* -type f -name 'error_log'`; do rm -f $i; done | |
# Permissions fix | |
find . -type f -exec chmod 644 {} \; |
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
UPDATE wp_posts SET post_content = TRIM(LEADING '>' FROM post_content); |