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 | |
declare(strict_types=1); | |
interface TicketRepositoryInterface | |
{ | |
public function load($ticketID): Ticket; | |
public function save($ticket): void; | |
public function update($ticket): void; | |
public function delete($ticket): void; |
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 | |
declare(strict_types=1); | |
namespace common\modules\catalog\frontend\components; | |
/** | |
* Класс для работы с комплексными числами | |
* | |
* @author Котов Артём <kotov.as2@dns-shop.ru> |
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
sudo service php5.6-fpm reload | |
sudo nginx -t | |
sudo nginx -s reload | |
sudo /etc/init.d/nginx restart | |
service --status-all |
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
--- Создает коммит который отменяет изменения указанного коммита, аттрибут m требуется если это мердж коммит - указать какого родителя (первый, второй и тд) | |
git revert <commit_hash> -m 1 | |
--- удаляет последний коммит, если он еще не запушен | |
git reset --hard HEAD~1 | |
--- сливает ветки, но не коммитит | |
git merge --no-commit merge_branch | |
git merge --no-commit --no-ff merge_branch |
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
SHOW GRANTS | |
SHOW GRANTS FOR CURRENT_USER; | |
-- выключить кэш для текущей сесси | |
SET SESSION query_cache_type = OFF; | |
SET SESSION query_cache_limit = 0; | |
SET SESSION query_cache_size = 0; | |
SET SESSION query_cache_type = 0; | |
SET SESSION query_cache_size = 0; |
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
-- Kill all php-fpm processes | |
sudo kill -9 `sudo ps -ef | grep php-fpm | grep -v grep | awk '{print $2}'` | |
killall -KILL php-fpm | |
ps -aux | grep php-fpm | |
--- получить юзера от которого запущен пхп | |
$processUser = posix_getpwuid(posix_geteuid()); | |
print $processUser['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
https://ru.wikipedia.org/wiki/Поиск_длиннейшей_подстроки-палиндрома#.D0.90.D0.BB.D0.B3.D0.BE.D1.80.D0.B8.D1.82.D0.BC_.D0.9C.D0.B0.D0.BD.D0.B0.D0.BA.D0.B5.D1.80.D0.B0 | |
https://habr.com/ru/post/276195/ | |
https://gist.github.com/esase/56a249658a5dfe38228447b1af2723d6 | |
https://github.com/search?l=PHP&q=Manacher&type=Repositories |
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
https://devconf.ru/data/devconf2016/ppt/108.pdf | |
https://habr.com/ru/post/208442/ | |
https://sourcemaking.com/design_patterns | |
https://refactoring.guru/ru/design-patterns | |
https://phptherightway.com/pages/Design-Patterns.html | |
https://designpatternsphp.readthedocs.io/ru/latest/README.html | |
https://habr.com/ru/company/mailru/blog/412699/ |
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\Http\Action\Blog; | |
use App\ReadModel\PostReadRepository; | |
use Framework\Template\TemplateRenderer; | |
use Psr\Http\Message\ResponseInterface; | |
use Psr\Http\Message\ServerRequestInterface; | |
use Psr\Http\Server\RequestHandlerInterface; | |
use Zend\Diactoros\Response\EmptyResponse; |
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
http://artemio-todo.herokuapp.com |
NewerOlder