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 | |
/** | |
* | |
* AppEmailComponent (for Japanese) | |
* | |
* Copyright 2010, nojimage (http://php-tips.com/) | |
* | |
* Licensed under The MIT License | |
* Redistributions of files must retain the above copyright notice. | |
* |
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
(function($) { | |
$.fn.pluginname = function(options) { | |
// build main options before element iteration | |
var opts = $.extend({}, $.fn.pluginname.defaults, options); | |
opts.debug && debug(this); | |
// iterate and reformat each matched element | |
return this.each(function() { | |
$this = $(this); | |
}); | |
}; |
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/sh | |
cd /path/to/your_app_root | |
# ls | |
# cake app ... | |
find ./*/tmp/cache -type f \( -name 'cake_*' -o -name 'element_*' -o -name '*.*' \) -exec rm {} \; |
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/sh | |
cd /path/to/your_app_root | |
# ls | |
# cake app ... | |
find app/tmp -type d -exec chmod 0777 {} \; |
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
# AnyController.php | |
var $paginate = array( | |
'paramType' => 'querystring', | |
); |
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
# via http://d.hatena.ne.jp/yukioc/20090920/1253413686 | |
git config --global alias.log-all "log --graph --all --color --pretty='%x09%h %cn%x09%s %Cred%d%Creset'" |
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 | |
App::uses('View', 'View'); | |
App::uses('SampleHelper', 'View/Helper'); | |
class SampleHelperTestCase extends CakeTestCase { | |
public function setUp() { | |
parent::setUp(); | |
$this->View = new View(null); |
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 | |
// insert this class and | |
// $this->Sample = new SampleExposed(); | |
class SampleExposed extends Sample { | |
public function __call($method, array $args = array()) { | |
if (!method_exists($this, $method)) | |
throw new BadMethodCallException("method '$method' does not exist"); | |
return call_user_func_array(array($this, $method), $args); | |
} | |
} |
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/sh | |
git pull | |
git submodule sync | |
git submodule update --init |
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
<div> | |
<cake:noncache> | |
<?php echo $this->Session->read('Auth.User.username'); ?> | |
</cake:nocache> | |
</div> |
OlderNewer