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
echo (memory_get_usage() / 1024 / 1024, 2) . ' MB' . PHP_EOL; |
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
/** | |
* Class ArrayCollection | |
* | |
* @package Shopmacher\Base\FrontendBundle\Model | |
*/ | |
class ArrayCollection implements CollectionInterface | |
{ | |
/** | |
* @var array | |
*/ |
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
# Fix it! | |
# in webpack/config.js | |
resolve: { | |
alias: { | |
pace: 'pace-js' | |
} | |
} | |
# in page.js |
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
Repository has only responsibility to QUERY (R) one or all entites by a specific set criteria | |
Manager contains business code to create, update, delete entities (CUD). It ships the repository inside. |
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
Unit-test: You will figure out missing logic, wrong types returned or params ... things which you can not think when programming the business code | |
Behat: It's really a supervisor for your website, which make sure all fuctions work well after adding new features. |
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
Normally 503 service unavailable errors come from the server run out of memory. | |
Case: It occurs only on a some pages | |
==> Try to find the code which take the most memory (pdf, importing, ...) | |
Case: Whole site down | |
==> Check memory now by some tools such as: top, htop... | |
Restart php-fpm | |
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
Install vagrant-vbguest plugin | |
> vagrant plugin install vagrant-vbguest |
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
>/etc/init.d/php7.0-fpm restart |
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
> composer depends [package-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
# check status | |
> git status | |
Changes not staged for commit: | |
(use "git add <file>..." to update what will be committed) | |
(use "git checkout -- <file>..." to discard changes in working directory) | |
modified: hello.html | |
# discard changes | |
> git checkout hello.html |