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 | |
| define('STOP_STATISTICS', true); | |
| define('BX_SECURITY_SHOW_MESSAGE', true); | |
| define("NOT_CHECK_PERMISSIONS", true); | |
| $_SERVER['DOCUMENT_ROOT'] = '/home/bitrix/www'; | |
| require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.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
| #Делаем просто архив | |
| tar czf name_of_archive_file.tar.gz name_of_directory_to_tar | |
| tar cvf some.tar file1 file2 file3 | |
| #Исключаем директорию | |
| tar --exclude='./folder' --exclude='./upload/folder2' -zcvf /backup/filename.tgz . | |
| #пример | |
| tar --exclude='./.git' -zcvf www_feiron.tar.gz . |
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
| log_format real_ip '$http_x_forwarded_for - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent"'; | |
| access_log /var/log/nginx/access.log real_ip; | |
| # Доверенные прокси — IP-диапазоны Cloudflare | |
| set_real_ip_from 103.21.244.0/22; | |
| set_real_ip_from 103.22.200.0/22; | |
| set_real_ip_from 103.31.4.0/22; |
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
| $iUserID = CBPHelper::StripUserPrefix("{{Кем создан}}"); | |
| $arAbsenceDates = \CIntranetUtils::GetAbsenceData( | |
| array( | |
| 'USERS' => array($iUserID), | |
| 'DATE_START' => '01.01.' . date('Y'), | |
| 'DATE_FINISH' => ConvertTimeStamp(false, 'SHORT'), | |
| 'PER_USER' => false | |
| ), | |
| $MODE = BX_INTRANET_ABSENCE_ALL |
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 | |
| # === НАСТРОЙКИ === | |
| BACKUP_DIR="/var/backups/mysite" # Папка для хранения резервных копий | |
| SITE_DIR="/var/www/mysite" # Папка сайта | |
| DB_NAME="mydatabase" # Имя базы данных | |
| DB_USER="dbuser" # Пользователь MySQL | |
| DB_PASS="dbpassword" # Пароль MySQL | |
| MAX_BACKUPS=5 # Максимальное количество копий | |
| DATE=$(date +"%Y-%m-%d_%H-%M-%S") |
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
| /* | |
| -- Если ошибка не могу отключить пользователя через настройки модуля | |
| */ | |
| \CModule::IncludeModule('disk'); | |
| use Bitrix\Disk\Configuration; | |
| use Bitrix\Disk\Document\BitrixHandler; | |
| use Bitrix\Disk\UserConfiguration; | |
| \Bitrix\Main\Loader::requireModule('disk'); | |
| (new \Bitrix\Disk\Document\OnlyOffice\Configuration())->resetCloudRegistration(); | |
| UserConfiguration::resetDocumentServiceForAllUsers(); |
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
| sudo dd if=/dev/zero of=/swapfile count=4096 bs=1MiB | |
| chmod 600 /swapfile | |
| mkswap /swapfile | |
| swapon /swapfile | |
| (проверить swapon -s) | |
| /etc/fstab | |
| /swapfile swap swap sw 0 0 | |
| (проверить mount -a) |
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
| bal $MESS; | |
| $MESS['IBLOCK_PROP_CHECKBOX_DESC'] = 'Флажок'; | |
| $MESS['IBLOCK_PROP_CHECKBOX_YES'] = 'Да'; | |
| $MESS['IBLOCK_PROP_CHECKBOX_NO'] = 'Нет'; | |
| $MESS['IBLOCK_PROP_CHECKBOX_NA'] = '(любой)'; | |
| class CIBlockPropertyCheckbox{ | |
| function GetUserTypeDescription(){ |
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
| Для ваелвотчера лесс что бы он мог подтягивать в винде инклюд файлы | |
| $FileName$ $FileNameWithoutExtension$.css --source-map --include-path="$ProjectFileDir$" $FileName$ |
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 | |
| define('STOP_STATISTICS', true); | |
| define('BX_SECURITY_SHOW_MESSAGE', true); | |
| define("NO_KEEP_STATISTIC", true); | |
| define("NO_AGENT_STATISTIC", true); | |
| define("NOT_CHECK_PERMISSIONS", true); | |
| $_SERVER['DOCUMENT_ROOT'] = '/home/bitrix/www'; | |
| require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); |
NewerOlder