Skip to content

Instantly share code, notes, and snippets.

View quanganhdo's full-sized avatar

Anh Do quanganhdo

View GitHub Profile
.DS_Store
app/config/database.php
app/config/core.php
app/tmp
app/tests
function beforeRender() {
if ($this->RequestHandler->isAjax() || $this->layout == 'ajax' || $this->RequestHandler->isRss()) {
Configure::write('debug', 0);
}
}
<?php
class AppModel extends Model{
// http://noserub.com/download/
var $sanitizeExclusion = array(); // models to exclude
var $sanitization = array (
/*
'Model' => array (
'ignore_keys' => null, # define an array of the keys you don't want to sanitize
'allow_tags' => array('<a>'), # define an array of allowed tags
<?php do_action('wp_footer'); ?>
<?php
class Post extends AppModel {
var $hasMany = array('Comment');
}
class Comment extends AppModel {
var $belongsTo = array(
'Post' => array('counterCache' => true)
);
}
<?php
class AppController extends Controller {
var $components = array('RequestHandler');
function beforeRender() {
if ($this->RequestHandler->isAjax() || $this->layout == 'ajax') {
Configure::write('debug', 0);
} else {
Configure::write('debug', 2);
}
javascript:var%20e3%20=%20document.createElement("script");%20e3.setAttribute("src","http://quanganhdo.com/e3/e3.js?mc="+new%20Date().getTime());%20void(document.getElementsByTagName("head")[0].appendChild(e3));
jQuery('textarea:visible').each(function(i, n) {
var current = this;
var pos = jQuery(this).offset();
var top = pos.top + jQuery(this).outerHeight();
var left = pos.left + jQuery(this).outerWidth() - 33;
jQuery('<img class="e3" id="e3_' + i+ '" src="' + e3_base_url + 'e3.png" />').appendTo('body');
jQuery('#e3_' + i).css({
position: 'absolute',
top: top,
left: left,
var horoscope_name = 'Horoscope';
var horoscope_base_url = 'http://emo.buzzbanbe.net/sets/horoscope/';
var horoscope_files = ['aquarius.gif', 'aries.gif', 'cancer.gif', 'capricorn.gif', 'gemini.gif', 'leo.gif', 'libra.gif', 'pisces.gif', 'sagittarius.gif', 'scorpio.gif', 'taurus.gif', 'virgo.gif'];
packs.push('horoscope');
name = document.getElementsByTagName('title')[0].innerHTML.replace(/BuzzIcon - /, '').replace(/^\s*/g, '').replace(/\s*$/g, '');
id = name.replace(/[-\s]/g, '_').toLowerCase();
emo = $x('//li/div/img');
console.log('var ' + id + "_name = '" + name + "';");
console.log('var ' + id + "_base_url = '" + emo[0].src.match(/(http:\/\/emo.buzzbanbe.net\/sets\/.*?\/)/)[0] + "';");
for (var i = 0; i < emo.length; i++) {
emo[i] = emo[i].src;
}
console.log('var ' + id + "_files = ['" + emo.join("', '").replace(/http:\/\/emo.buzzbanbe.net\/sets\/.*?\//g, '') + "']" + ";");
console.log("packs.push('" + id + "');");