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
<?php | |
function xmlToArray(string $xml) | |
{ | |
$doc = new DOMDocument(); | |
$doc->loadXML($xml); | |
$root = $doc->documentElement; | |
$output = domNodeToArray($root); | |
$output['@root'] = $root->tagName; | |
return $output; |
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
{ | |
"apps": [ | |
{ | |
/* General */ | |
"name": "my-api", /* (string) application name (default to script filename without extension) */ | |
"script": "index.js", /* (string) script path relative to pm2 start */ | |
"cwd": "/var/www/", /* (string) the directory from which your app will be launched */ | |
"args": "-a 13 -b 12", /* (string) string containing all arguments passed via CLI to script */ | |
"interpreter": "/usr/bin/python", /* (string) interpreter absolute path (default to node) */ | |
"interpreter_args": "--harmony", /* (string) option to pass to the interpreter */ |
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
cd /tmp | |
wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb | |
dpkg -i zabbix-release_3.4-1+xenial_all.deb | |
apt-get update | |
apt install zabbix-agent zabbix-sender zabbix-get | |
#rabbitmq | |
echo "deb https://dl.bintray.com/rabbitmq/debian xenial main" | sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list | |
wget -O- https://www.rabbitmq.com/rabbitmq-release-signing-key.asc | sudo apt-key add - | |
sudo apt-get update |
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
docker kill $(docker ps -q) | |
docker rm $(docker ps -a -q) -f | |
docker rmi $(docker images -q) -f | |
docker system prune |
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
docker-compose up -d | |
docker-compose run --rm app bin/wait # ждет пока поднимется все | |
docker-compose run --rm app bin/console doctr:mig:mig -n | |
docker-compose run --rm app bin/phpunit --testsuite integration | |
docker kill $(docker ps -q) | |
docker rm $(docker ps -a -q) -f | |
docker rmi $(docker images -q) -f | |
docker system prune --volumes |
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
[user] | |
name = {{имя}} {{фамилия}} | |
email = {{емейл}} | |
[core] | |
symlinks = false | |
autocrlf = true | |
repositoryformatversion = 0 | |
filemode = false | |
[color] | |
diff = auto |
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
define('ROOT', dirname(dirname(__DIR__)) . '/'); | |
require_once ROOT . 'vendor/autoload.php'; | |
use Codeception\Configuration; | |
$kernel = AspectMock\Kernel::getInstance(); | |
$kernel->init([ | |
'debug' => true, | |
'appDir' => ROOT.'app', |
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
#frontend | |
server { | |
listen 80; | |
server_name admin.host.com; | |
server_tokens off; | |
client_max_body_size 8M; | |
charset utf-8; | |
access_log /home/www-data/admin.host.com/logs/frontend-access.log; |
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
<?php | |
ini_set("error_reporting", E_ALL & ~E_DEPRECATED); | |
define('projects_dir',"www/"); | |
define('apache_dir',"/etc/apache2/"); | |
define('apache_config_www_folder',"/home/\${APACHE_RUN_USER}/Web/www/"); | |
define('host_delimiter',"#------------------APACHE 2 HOSTS UPDATER---DONT MODIFY THIS BLOCK-----------------"); | |
$doneHosts = []; |
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
SELECT CONCAT('ALTER TABLE `', table_name, '` MODIFY `', column_name, '` ', DATA_TYPE, ' CHARACTER SET UTF8 COLLATE utf8_bin;') | |
FROM information_schema.COLUMNS | |
WHERE TABLE_SCHEMA = 'jira' | |
AND DATA_TYPE != 'varchar' | |
AND | |
( | |
CHARACTER_SET_NAME != 'utf8' | |
OR | |
COLLATION_NAME != 'utf8_bin' |