docker stop $(docker ps -qa) && docker rm $(docker ps -qa) && docker rmi -f $(docker images -qa) && docker volume rm $(docker volume ls -q) && docker network rm $(docker network ls -q)
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 | |
# Создание разделов | |
cgdisk /dev/sda | |
# Форматирование разделов | |
mkfs.fat -F32 /dev/sda1 | |
mkswap /dev/sda2 -L swap | |
mkfs.ext4 /dev/sda3 -L root | |
mkfs.ext4 /dev/sda4 -L home |
В init.php
PHP 7.0+
Bitrix (Бизнес) 16+
Изменение типов цен в зависимости от суммы коризны.
- При сумме заказа до 15 000 рублей по розничной стоимости - тип цены розница
- При сумме заказа от 15.000 руб по розничной стоимости - тип цены мелкий опт
- При сумме заказа от 50.000 руб по мелкий опт стоимости - тип цены средний опт
- При сумме заказа от 100.000 руб по средний опт стоимости - тип цены крупный опт
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
<?if($USER->IsAuthorized()):?> | |
авторизованный пользователь... | |
<?else:?> | |
не авторизованный посетитель... | |
<?endif?> | |
//лого без ссылки на главной | |
<? $isIndex = ($APPLICATION->GetCurPage(false) == SITE_DIR)?> | |
<?if (!$isIndex):?> |
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
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); | |
use Bitrix\Iblock\SectionTable; | |
use Bitrix\Iblock\ElementTable; | |
use Bitrix\Main\Loader; | |
use Bitrix\Main\SystemException; | |
Loader::includeModule('iblock'); | |
// $elementId = 495982; | |
// $element = ElementTable::getRow([ |
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 | |
/** | |
* Класс BrowserConsoleDebug | |
* | |
* Выводит отладочную информацию в консоль браузера. | |
* | |
* Может использоваться в качестве обработчика ошибок Битрикс. | |
* | |
* Для этого необходимо прописать его в /bitrix/.settings.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
Шаблон | |
Пролог/подключение языковых файлов (header.php/footer.php) | |
<? | |
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); | |
IncludeTemplateLangFile(__FILE__); | |
?> | |
Язык шаблона | |
<html lang="<?=LANGUAGE_ID?>"> |
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 | |
# finished install proccess | |
# first update | |
sudo apt -y update && sudo apt -y upgrade | |
# settings: | |
# notification -> disable sounds | |
# sound -> sound effects -> mute |
NewerOlder