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
#!/bin/bash | |
connected=$(xrandr | grep 'HDMI-2 connected') | |
# подключен ли монитор | |
if [[ -z "$connected" ]]; then | |
echo 'Монитор не подключен' | |
# выключим отображение, если вдруг оно активно (просто был выдернут шнур) | |
xrandr --output HDMI-2 --off |
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 | |
namespace Deployer; | |
require 'recipe/yii2-app-advanced.php'; | |
set('ssh_multiplexing', true); | |
set('bin/php', 'php'); | |
set('repository', 'https://bitbucket.org/*****/*****'); | |
set('git_tty', true); |
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 | |
namespace Deployer; | |
require 'recipe/yii2-app-advanced.php'; | |
/* | |
* Configuration | |
*/ | |
set('bin/php', '/opt/php70/bin/php'); |
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 | |
/** | |
* Хэлпер для простого рендера шаблонов | |
* | |
* Class Templater | |
* @author igancev | |
* @email [email protected] | |
*/ | |
class Templater | |
{ |
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.yml | |
--------------------------------------------- | |
version: "2" | |
services: | |
nginx-frontend: | |
image: nginx | |
links: | |
- php-fpm | |
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
<?php | |
class XmlHelper | |
{ | |
public static function text2xml($text) | |
{ | |
$text = preg_replace("/[\x1-\x8\xB-\xC\xE-\x1F]/", "", $text); | |
$text = str_replace('"', '"', $text); | |
$text = str_replace("&", "&", $text); |