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 SubdomainComponent extends Object { | |
var $__settings = array( | |
'base' => 'example.com', | |
'domains' => array(), | |
'param' => 'subdomain', | |
'redirect' => true, | |
'redirectTo' => 'http://example.com', | |
'model' => 'DomainPrefix', |
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 | |
/** | |
* Create symlink plugins and themes webroot to APP/webroot/ | |
* | |
* CakePHP 1.3 | |
* PHP versions 5 | |
* | |
* Copyright 2011, nojimage (http://php-tips.com/) | |
* |
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
// shorten/alias long canvas method names | |
// adapted from: http://marijn.haverbeke.nl/js1k.html | |
var Canv = document.body.children.c, | |
Gr = Canv.getContext("2d"), | |
prop | |
; | |
for (prop in Gr) { | |
Gr[ prop[0] + (prop[3]||"") + (prop[6]||"") ] = Gr[prop]; |
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.fn.toggleFade = function(speed, callback) { | |
speed = ~~speed || 400; | |
callback = callback || jQuery.noop; | |
return this.each(function() { | |
var $this = jQuery(this); | |
$this[$this.is(':hidden') ? 'fadeIn' : 'fadeOut'](speed, callback); | |
}); | |
}; |
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
/*! | |
* toggleAttr() jQuery plugin | |
* @link http://github.com/mathiasbynens/toggleAttr-jQuery-Plugin | |
* @description Used to toggle selected="selected", disabled="disabled", checked="checked" etc… | |
* @author Mathias Bynens <http://mathiasbynens.be/> | |
*/ | |
jQuery.fn.toggleAttr = function(attr) { | |
return this.each(function() { | |
var $this = $(this); | |
$this.attr(attr) ? $this.removeAttr(attr) : $this.attr(attr, attr); |