This file contains hidden or 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
Это нужно чтобы ловить webhook от различных сервисов на локаль, либо чтобы показать сайт заказчику. | |
Что нужно: Сервер со статическим IP с настроенным NGINX, и localhost с установленным ssh | |
Что получится в итоге: при открытии some.site.ru будет открыт дефолтный сервер на localhost |
This file contains hidden or 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
/path/to/dumps/*.sql { | |
daily | |
rotate 14 | |
missingok | |
create 660 andrey andrey | |
compress | |
sharedscripts | |
postrotate | |
USER="dbuser" | |
PASSWORD="dbpassword" |
This file contains hidden or 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
Настройка dnsmasq |
This file contains hidden or 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
# /home/from/Pictures/1/2/asdasd/cdcz/asdqwe/asdfasgfas/vfhbgh/vfahdfg/dsfahgasg/asdh725 | |
cd `pwd | replace from to` | |
# /home/to/Pictures/1/2/asdasd/cdcz/asdqwe/asdfasgfas/vfhbgh/vfahdfg/dsfahgasg/asdh725 | |
#if directory structure is identical |
This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
echo PHP_EOL."\033[43mStarting unit tests\033[0m".PHP_EOL; | |
exec('phpunit -c app', $output, $returnCode); | |
if ($returnCode !== 0) | |
{ | |
while (($minimalTestSummary = array_pop($output)) !== null) |
This file contains hidden or 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 "~^((?<subdomain>.+)\.)?(?<domain>.+)\.loc$"; | |
set $projects_dir /var/www; | |
set $project_dir $projects_dir/$domain; | |
if (-d $projects_dir/$subdomain.$domain) { | |
set $project_dir $projects_dir/$subdomain.$domain; | |
} | |
set $index index.php; | |
set $root_dir $project_dir/public; |