We can't make this file beautiful and searchable because it's too large.
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,"Москва и Московская область" | |
2,"Санкт-Петербург" | |
3,"Центральный федеральный округ" | |
4,"Белгород" | |
5,"Иваново" | |
6,"Калуга" | |
7,"Кострома" | |
8,"Курск" | |
9,"Липецк" |
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
# run as root | |
apt-get update && apt-get install -y wget unzip | |
BUILD_DEPS='build-essential zlib1g-dev libjpeg-dev make' | |
apt-get install -y $BUILD_DEPS --no-install-recommends \ | |
&& wget -q https://github.com/qpdf/qpdf/archive/release-qpdf-8.4.2.zip \ | |
&& unzip -q release-qpdf-8.4.2.zip && rm release-qpdf-8.4.2.zip \ | |
&& cd qpdf-release-qpdf-8.4.2 && ./configure && make && make install && ldconfig \ | |
&& cd .. && rm -rf qpdf-release-qpdf-8.4.2 | |
# optional remove build deps | |
apt-get purge -y --auto-remove $BUILD_DEPS && apt-get clean |
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
#!/usr/bin/env node | |
let express = require('express'), | |
logger = require('morgan'), | |
proxy = require('express-http-proxy'); | |
let php = process.argv.length > 2 ? process.argv[2] : '127.0.0.1:8080'; | |
let staticResult = express.static(process.cwd()); | |
let proxyResult = proxy(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 // by SiMM | |
$headers = apache_request_headers(); // получаем все заголовки клиента | |
if (!isset($headers['Authorization'])) { // если заголовка авторизации нет | |
header('HTTP/1.0 401 Unauthorized'); // требуем от клиента авторизации | |
header('WWW-Authenticate: NTLM'); // тип требуемой авторизации - NTLM | |
exit; // завершаем выполнение скрипта | |
} | |
// заголовок авторизации от клиента пришёл | |
if (substr($headers['Authorization'],0,5) == 'NTLM ') { // проверяем, что это NTLM-аутентификация | |
$chain = base64_decode(substr($headers['Authorization'],5)); // получаем декодированное значение |
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
DELETE `or`, ort FROM `order_recurring` `or`, `order_recurring_transaction` `ort` WHERE order_id IN (SELECT order_id FROM `order` where order_id < 14000) AND ort.order_recurring_id = `or`.order_recurring_id; | |
DELETE FROM `order_product` WHERE order_id IN (SELECT order_id FROM `order` where order_id < 14000); | |
DELETE FROM `order_option` WHERE order_id IN (SELECT order_id FROM `order` where order_id < 14000); | |
DELETE FROM `order_voucher` WHERE order_id IN (SELECT order_id FROM `order` where order_id < 14000); | |
DELETE FROM `order_total` WHERE order_id IN (SELECT order_id FROM `order` where order_id < 14000); | |
DELETE FROM `order_history` WHERE order_id IN (SELECT order_id FROM `order` where order_id < 14000); | |
DELETE FROM `affiliate_transaction` WHERE order_id IN (SELECT order_id FROM `order` where order_id < 14000); | |
DELETE FROM `order` WHERE order_id < 14000; | |
DELETE FROM `sbacquiring` WHERE num_order < 14000; -- optional |
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
[[!FormIt? | |
&hooks=`email` | |
&submitVar=`callback` | |
&emailTpl=`callback-email-tpl` | |
&emailSubject=`Запрос обратного звонка с сайта [[++site_name]]` | |
&emailTo=`[[++contact_email]]` | |
&emailFrom=`[[++emailsender]]` | |
&successMessage=`ok` | |
&validate=`name:required:minLength=^3^,phone:required:minLength=^7^` | |
]] |
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
/* | |
* Yandex.Metrika ecommerce helper script | |
* Docs: https://yandex.ru/support/metrika/data/e-commerce.xml | |
* Author: [email protected] | |
*/ | |
window.dataLayer = window.dataLayer || []; | |
function ecommDetail(products) { | |
products = [].concat(products); |
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 | |
// usage: | |
// [[!metrikaPurchase? &orderId=`[[!+fi.orderID]]`]] | |
$orderId = intval($modx->getOption('orderId', $scriptProperties, 0)); | |
$modx->addPackage('shopkeeper', MODX_CORE_PATH . 'components/shopkeeper/model/'); | |
$order = $modx->getObject('SHKorder', $orderId); | |
if ($order == null) { | |
return; |
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 | |
$auth_redirect = $modx->makeUrl($modx->resource->id, '', '', 'full'); | |
// token | |
if (isset($_GET['code'])) { | |
$code = $_GET['code']; | |
$ctx = stream_context_create(array( | |
'http' => array( | |
'method' => 'POST', | |
'header' => 'Content-type: application/x-www-form-urlencoded', |
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
Snippet: [[SnippetName]] | |
Chunk: [[$ChunkName]] | |
System Setting: [[++SettingName]] | |
TV: [[*fieldName/TvName]] | |
Link tag: [[~PageId? ¶mName=`value`]] | |
Placeholder: [[+PlaceholderName]] | |
<?php |
NewerOlder