This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This one is samdark's personal list.
<?php | |
/** | |
* Q: | |
* | |
* Hi, could please add this feature please. Here is my case, I have two themes | |
* and I have modules. How can one set each view file in the modules to use | |
* either one of the themes. Such if the view is admin use backoffice theme and | |
* if view is index use siteNew theme. I so someting like setBasePath and | |
* setBaseUrl but I don not know where they should be exactly. | |
* |
<?php | |
/** | |
* Yii, simple HMVC | |
*/ | |
class HmvcController extends Controller | |
{ | |
public function actionIndex() | |
{ | |
echo $this->execute('/hmvc/do/id/123'); | |
} |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
This one is samdark's personal list.
git filter-branch --commit-filter ' | |
if [ "$GIT_COMMITTER_NAME" = "Alex" ]; | |
then | |
GIT_COMMITTER_NAME="Alexander Makarov"; | |
GIT_AUTHOR_NAME="Alexander Makarov"; | |
GIT_COMMITTER_EMAIL="[email protected]"; | |
GIT_AUTHOR_EMAIL="[email protected]"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; |
<?php | |
/** | |
* interview street test runner | |
* | |
* Test code should be in /test.php. | |
* Tests should be unpacked under /tests. | |
*/ | |
$dir=dirname(__FILE__) . "/tests"; | |
$di=new DirectoryIterator($dir); |
git checkout . | |
git-clean -f |
<?php | |
// first you need to export all your time you want to sum up and copy to this script dir | |
$sum = 0; | |
$f = fopen('export_tasks.csv', 'r'); | |
if($f) | |
{ | |
while (($data = fgetcsv($f, 1000, ",")) !== FALSE) { | |
if(!isset($data[4])) | |
continue; |
<?php | |
/** | |
* Component class file. | |
* | |
* @link http://www.yiiframework.com/ | |
* @copyright Copyright © 2008-2012 Yii Software LLC | |
* @license http://www.yiiframework.com/license/ | |
*/ | |
namespace yii\base; |
<?php | |
/** | |
* Object class file. | |
* | |
* @link http://www.yiiframework.com/ | |
* @copyright Copyright © 2008-2012 Yii Software LLC | |
* @license http://www.yiiframework.com/license/ | |
*/ | |
namespace yii\base; |