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 | |
CModule::IncludeModule('sale'); | |
$res = $DB->Query("select ID from b_sale_order where CANCELED = 'Y' by id ASC LIMIT 500"); | |
$count = 0; | |
while ($row = $res->Fetch()) { | |
CSaleOrder::Delete($row['ID']); | |
$count += 1; | |
} | |
//echo "Deleted $count orders" |
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
// Получение метаданных конфигурации из внешнего файла: | |
ДанныеCF = Новый ДвоичныеДанные(ПутьККонфигурации); | |
МетаCF = Новый ОбъектМетаданныхКонфигурация(ДанныеCF); | |
// Получение метаданных расширения | |
ДанныеCFE = РасширенияКонфигурации.Получить()[0].ПолучитьДанные(); | |
МетаCFE = Новый ОбъектМетаданныхКонфигурация(ДанныеCFE); | |
// И даже есть специальный объект для получения информации из *.cfu-файла обновления конфигурации: | |
ДанныеCFU = Новый ДвоичныеДанные(ПутьКОбновлению); |
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
service httpd stop | |
yum install php56 | |
yum --enablerepo=remi-php56 install \ | |
php56-php php56-php-pear php56-php-bcmath\ | |
php56-php-pecl-jsond-devel php56-php-mysqlnd \ | |
php56-php-gd php56-php-common php56-php-fpm \ | |
php56-php-intl php56-php-cli php56-php php56-php-xml \ | |
php-php-opcache php56-php-pecl-apcu php56-php-pecl-jsond \ |
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
#Получить список файлов, измененных между двумя коммитами. | |
git log --name-only --pretty=oneline --full-index COMMIT1..COMMIT1 | grep -vE '^[0-9a-f]{40} ' | sort | uniq | |
# Здесь | |
# COMMIT1 - первый коммит или тэг | |
# COMMIT2 - второй коммит или тэг, или, например, HEAD |
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
git config --local core.pager "iconv -f cp1251 -t utf-8 | less" |
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
Функционал: Выбор группы исполнителей в заказ-наряде | |
Я как мастер цеха | |
Хочу иметь возможность объединять сотрудников в группы (бригады) | |
И выбирать эти группы (бригады) в качестве исполнителей работ | |
Контекст: | |
Допустим, в справочнике Сотрудники есть группа "Бригада 1" | |
И в этой группе есть элементы: | |
""" |
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
&НаСервере | |
Функция ИмяПользователяНаСервере() | |
Возврат ИмяПользователя(); | |
Конецфункции | |
&НаКлиенте | |
Процедура Команда1(Команда) | |
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 | |
# apache | |
sudo a2dismod php7.2 | |
sudo a2enmod php5.6 | |
sudo service apache2 restart | |
# cli | |
sudo update-alternatives --set php /usr/bin/php5.6 | |
sudo update-alternatives --set phar /usr/bin/phar5.6 |
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
$CATALOG_IBLOCK_ID = 42; | |
//////////////////////////////////////////////////////////////////////////////// | |
CModule::IncludeModule("iblock"); | |
$arIBlock = CIBlock::GetByID($CATALOG_IBLOCK_ID)->Fetch(); | |
echo " | |
<?xml version=\"1.0\" encoding=\"UTF-8\"?> | |
<Разделы> |