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
# CakePHP | |
/app/tmp/* | |
/app/Config/database.php | |
/app/Config/core.php | |
!empty | |
/plugins | |
/vendors | |
/app/webroot/coverage/* | |
/tmp/* | |
/app/Plugin/* |
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
/** | |
* applyClass method | |
* | |
* @param string $feildname form feild name | |
* | |
* @return boolean true if isFieldError satisfies else false | |
*/ | |
public function applyClass($feildname) | |
{ |
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
if (!$conditionState) { | |
$condition = array( | |
'OR' => array( | |
array( | |
'Holiday.date' => array( | |
$dates['start'], $dates['end'], | |
) | |
), | |
array( | |
'EXTRACT(MONTH FROM Holiday.date)' => date('m', strtotime($dates['start'])), |
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
saveField(string $fieldName, string $fieldValue, array $params = array()) | |
$params array can have any of the following available options as keys: | |
validate Set to true/false to enable disable validation. | |
callbacks Set to false to disable callbacks. Using ‘before’ or ‘after’ will enable only those callbacks. | |
$leaveSettings['WeekDiff'] = | |
(int)floor(date_diff(new DateTime($leaveSettings['sessionStartDate']), new DateTime($presentDay))->days/7); |
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 | |
$conditionalField | |
= '(IF( User.joined_date IS NOT NULL, | |
DATE_FORMAT(User.joined_date, "%d-%m"), | |
DATE_FORMAT(User.created, "%d-%m")))'; | |
$conditionalField2 | |
= '(IF( User.joined_date IS NOT NULL, | |
DATE_FORMAT(User.joined_date, "%Y"), | |
DATE_FORMAT(User.created, "%Y")))'; | |
$this->User->recursive = -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
<script> | |
if (/*@cc_on!@*/false) { | |
var headHTML = document.getElementsByTagName('head')[0].innerHTML; | |
headHTML += '<link type="text/css" rel="stylesheet" href="assets/ie.css">'; | |
document.getElementsByTagName('head')[0].innerHTML = headHTML; | |
} | |
</script> |
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 diff-tree -r --no-commit-id --name-only --diff-filter=ACMRT HEAD~1 HEAD | xargs tar -rf ~/exports/export.tar |
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
//Open sahi/htdocs/spr/concat.js | |
//and look for: | |
Sahi.prototype._isFF2 = function () {return /Firefox\/2|Iceweasel\/2|Shiretoko\/2/.test(this.navigator.userAgent);}; | |
Sahi.prototype._isFF3 = function () {return /Firefox\/3|Iceweasel\/3|Shiretoko\/3/.test(this.navigator.userAgent);}; | |
Sahi.prototype._isFF4 = function () {return /Firefox\/4|Iceweasel\/4|Shiretoko\/4/.test(this.navigator.userAgent);}; | |
Sahi.prototype._isFF5 = function () {return /Firefox\/5|Iceweasel\/5|Shiretoko\/5/.test(this.navigator.userAgent);}; | |
//and replace it with |
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
//run command | |
sudo a2enmod userdir | |
//open file | |
sudo nano /etc/apache2/mods-available/php5.conf | |
//change | |
<IfModule mod_userdir.c> |
OlderNewer