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
git filter-branch --commit-filter ' | |
if [ "$GIT_COMMITTER_NAME" = "<Old Name>" ]; | |
then | |
GIT_COMMITTER_NAME="<New Name>"; | |
GIT_AUTHOR_NAME="<New Name>"; | |
GIT_COMMITTER_EMAIL="<New Email>"; | |
GIT_AUTHOR_EMAIL="<New Email>"; | |
git commit-tree "$@"; | |
else | |
git commit-tree "$@"; |
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 AppModel extends Model { | |
private $sqlMap = array( | |
'mysql' => array( | |
'now' => 'NOW()', | |
'if' => 'IF(%1$s,%2$s,%3$s)', | |
'concat' => array('CONCAT(%s)', 'implode', ','), | |
'hour' => 'HOUR', | |
'year' => 'YEAR', | |
'date_sub' => 'DATE_SUB(%1$s, INTERVAL %2$s %3$s)', |
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 class="users index"> | |
<h2><?php echo __('Users'); ?></h2> | |
<?php | |
echo "<table cellpadding='0' cellspacing='0'> | |
<tr> | |
<th>No</th> | |
<th>ID</th> | |
<th>Username</th> | |
<th>Role</th> | |
<th>Status</th> |
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 | |
namespace App\View; | |
use Cake\View\View; | |
/** | |
* Class HintView | |
* | |
* @property \Cake\View\Helper\FormHelper $Form | |
* @property \Cake\View\Helper\HtmlHelper $Html |
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 | |
//Add method | |
public function add() { | |
if ($this->request->is('post')) { | |
$this->Truck->create(); | |
if ($this->Truck->saveAssociated($this->request->data)) { | |
$this->Session->setFlash(__('The truck has been saved.')); | |
return $this->redirect(array('action' => 'index')); | |
} else { | |
$this->Session->setFlash(__('The truck could not be saved. Please, try again.')); |
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 | |
$assets = array( | |
'0' => array( | |
'Asset' => array( | |
'id' => '542273cb-2490-490d-b771-4ec767094594', | |
'name' => 'Congregations (Dashboard)', | |
'alias' => 'Congregations/dashboard', | |
'modified' => '' | |
), |
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 | |
public function add() { | |
$applicant = $this->Applicants->newEntity($this->request->data); | |
debug($applicant); | |
$subjects = $this->Applicants->ApplicantSubjects->Subjects->find('list'); | |
$this->set('subjects', $subjects); | |
$this->set('applicant', $applicant); | |
} |
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 | |
$validator | |
->allowEmpty('number') | |
->add('number', 'valid', [ | |
'rule' => function ($value) { | |
return preg_match('/^(((\+44)? ?(\(0\))? ?)|(0))( ?[0-9]{3,4}){3}$/', $value) === 1; | |
} | |
]); |
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
Router::scope('/users', ['controller' => 'Creators'], function (RouteBuilder $routes) { | |
$routes->connect('/add', ['action' => 'add']); | |
}); |
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
vagrant@VAGRANT-BOX ~ | |
$ cmd | |
Microsoft Windows [Version 6.1.7601] | |
Copyright (c) 2009 Microsoft Corporation. All rights reserved. | |
C:\Users\vagrant>echo %cd% |
OlderNewer