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
| 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
| // Получение метаданных конфигурации из внешнего файла: | |
| Данные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
| <?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
| <?php | |
| CModule::IncludeModule('sale'); | |
| $res = $DB->Query("select ID from b_sale_order where EXTERNAL_ORDER = 'Y' and ID_1C is null order by id ASC LIMIT 1000"); | |
| $count = 0; | |
| while ($row = $res->Fetch()) { | |
| CSaleOrder::Delete($row['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
| <?php | |
| protected function onFieldModify($name, $oldValue, $value) | |
| { | |
| $result = new Result(); | |
| if ($name == "QUANTITY" && $value != 0) | |
| { | |
| $value = (float)$value; | |
| $oldValue = (float)$oldValue; |
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
| FROM alpine:3.6 | |
| ENV GOPATH /go | |
| ENV LEGO_VERSION master | |
| ENV http_proxy='http://user:pass@proxy:port' | |
| RUN apk update && apk add --no-cache --virtual run-dependencies ca-certificates && \ | |
| apk add --no-cache --virtual build-dependencies go git musl-dev && \ | |
| git config --global http.proxy $http_proxy |
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
| // Еще в 8.2 появился редко используемый на практике вариант получения ссылки на объект по уникальному идентификатору, | |
| // но до сих пор синтаксический контроль в конфигураторе не признает данную синтаксическую конструкцию как корректную | |
| // и выдает ошибку. | |
| УИД = Новый УникальныйИдентификатор(); | |
| РТУСсылка = Новый ДокументСсылка.РеализацияТоваровУслуг(УИД); | |
| // Альтернативные равнозначные варианты, не вызывающие ошибок синтаксического контроля. | |
| // 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
| sudo apt-get update | |
| # Apache2 | |
| sudo apt-get install apache2 | |
| # sudo apache2ctl configtest | |
| # Если выдает ошибку "Could not reliably determine the server's fully qualified domain name", | |
| # то нужно добавить в /etc/apache2/apache2.conf в коне файла строку | |
| # ServerName ДОМЕННОЕ_ИМЯ_ИЛИ_IP |
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
| Перем юТест; | |
| Функция ПолучитьСписокТестов(ЮнитТестирование) Экспорт | |
| юТест = ЮнитТестирование; | |
| ДобавитьТест("ТестДолжен_ПроверитьСложение", "Sum", "Сложить", Новый Структура("А,Б,Результат", 2, 2, 4)); | |
| КонецФункции |