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 PROJECT_ROOT/plugins/Apps/webroot/js/src/ProjectsCtrl.js and go to line no 6. | |
projectSlug = decodeURIComponent(projectSlug); | |
// Add this line after line 6 | |
// Open PROJECT_ROOT/plugins/Apps/webroot/js/src/FeedsCtrl.js and go to line no 11. | |
$scope.projectSlug = decodeURIComponent($scope.projectSlug); | |
// Add this line after line 11 | |
// Open PROJECT_ROOT/plugins/Apps/webroot/js/src/LabelsCtrl.js and go to line no 10. | |
projectSlug = decodeURIComponent(projectSlug); |
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 | |
// Open PROJECT_ROOT/src/Controller/AppController.php file and go to line no 123 (approximate line or find $this->Auth->allow) | |
// And then replace this snippet with below snippet. | |
$this->Auth->allow([ | |
'signup', | |
'verifyEmail', | |
'forgotPassword', | |
'install', | |
'resetPassword', | |
'requirements', |
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 | |
/** | |
* Catch php output buffering data over jQuery AJAX | |
* | |
* @author: Sohel Rana (me.sohelrana@gmail.com) | |
* @author url: https://blog.sohelrana.me | |
* @link: https://blog.sohelrana.me/catch-php-output-buffering-data-jquery-ajax/ | |
* @licence MIT | |
*/ |
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 | |
/** | |
* This is tiny class wrapper for uploading files using Cpanel API | |
* | |
* @author: Sohel Rana <me.sohelrana@gmail.com> | |
* @url: https://blog.sohelrana.me/upload-file-using-cpanel-api/ | |
* @license: MIT | |
*/ |
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 | |
/** | |
* @author: Sohel Rana | |
* @url: https://blog.sohelrana.me/parsing-xml-multiple-namespaces-using-php/ | |
* @license: MIT | |
* Parsing XML with multiple namespaces using PHP | |
*/ | |
$xmlString = "<en:Envelope xmlns:en=\"http://www.softcare.com/HIPAA/SC/Enrollment/0301\" | |
xmlns:sc=\"http://www.softcare.com/HIPAA/SC/0203\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" |
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
server { | |
listen 80; | |
server_name app.example.dev; # Write your server name | |
root /var/www/PROJECT/PROJECT_ROOT/; # Write your project root here. | |
access_log /var/log/nginx/PROJECT_ACCESS.log; | |
error_log /var/log/nginx/PROJECT_ERROR.log; | |
location / { | |
index index.php; |
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
runtime: php55 | |
api_version: 1.0 | |
service: helloworld | |
handlers: | |
# site root | |
- url: / | |
static_files: index.html | |
upload: index.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 | |
if(isset($iniData['DATABASE_CONFIGURATION_RESULT']) && $iniData['DATABASE_CONFIGURATION_RESULT']){ | |
ConnectionManager::config('application', [ | |
'className' => 'Cake\Database\Connection', | |
'driver' => 'Cake\Database\Driver\Mysql', | |
'persistent' => false, | |
'host' => $iniData['DATABASE_HOST'], | |
'username' => $iniData['DATABASE_USERNAME'], | |
'password' => $iniData['DATABASE_PASSWORD'], | |
'database' => $iniData['DATABASE_NAME'], |
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 | |
/** | |
* @author: Sohel Rana <sohelrana820> | |
* @author uri: http://sohelrana.me | |
*/ | |
$array = [ | |
[ | |
'cat' => 'Sales', | |
'data' => 'Park assist', |
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 | |
Email::configTransport('transporter_name', [ | |
'className' => 'Smtp', | |
'host' => 'SMTP_HOST', | |
'port' => 'SMTP_PORT', | |
'timeout' => 30, | |
'username' => 'SMTP_USERNAME', | |
'password' => 'SMTP_PASSWORD', | |
]); |