This file contains 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 apt update | |
RUN apt upgrade -y | |
RUN apt install -y apt-utils | |
RUN a2enmod rewrite | |
RUN apt install -y libmcrypt-dev | |
RUN docker-php-ext-install mcrypt | |
RUN apt install -y libicu-dev | |
RUN docker-php-ext-install -j$(nproc) intl | |
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev | |
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ |
This file contains 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 | |
/** | |
* @var MODX $modx | |
*/ | |
$obResource = $modx->resource; | |
//Вытаскиваем просмотры | |
$q = $modx->newQuery('modTemplateVarResource'); | |
$q->where(['tmplvarid' => 11, 'contentid' => $obResource->id]); |
This file contains 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 | |
require_once MODX_CORE_PATH . 'components/minishop2/model/minishop2/mspaymenthandler.class.php'; | |
class Tinkoff extends msPaymentHandler implements msPaymentInterface{ | |
public $demo; | |
public $shopId; //Идентификатор магазина | |
public $showcaseId; |
This file contains 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 | |
/** | |
* @var MODx $modx | |
*/ | |
$bitrix_url = 'https://megaakhuennayakompaniya.bitrix24.kz/rest/1/adktba2t3347qpgn/crm.lead.add'; | |
$params = $hook->getValues(); | |
$fields = [ | |
'fields' => [ | |
'TITLE' => $params['subject'], |
This file contains 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('MODX_API_MODE', true); | |
require 'index.php'; // Этот файл лежит в корне сайта | |
$modx->getService('error','error.modError'); | |
$modx->setLogLevel(modX::LOG_LEVEL_ERROR); | |
$modx->setLogTarget(XPDO_CLI_MODE ? 'ECHO' : 'HTML'); | |
// Проходимся по всем товарам | |
$products = $modx->getIterator('msProduct', array('class_key' => 'msProduct')); |
This file contains 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 | |
//Считаем проценты | |
$percent = $old_price/100; | |
$result = $price/$percent; | |
$result = ceil(100-$result); | |
return $result; |
This file contains 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
<IfModule mod_rewrite.c> | |
<IfModule mod_negotiation.c> | |
Options -MultiViews | |
</IfModule> | |
#### I MODIFIED HERE!!! | |
Options +FollowSymLinks | |
RewriteEngine On | |
## | |
## You may need to uncomment the following line for some hosting environments, |
This file contains 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
$(document).ready(function() { | |
$(document).on('change', '#mse2_sort', function() { | |
var selected = $(this).find('option:selected'); | |
var sort = selected.data('sort'); | |
sort += mse2Config.method_delimeter + selected.val(); | |
mse2Config.sort = sort; | |
mSearch2.submit(); | |
}); | |
}); |
This file contains 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. Linux-система, я делал на пользовательской сборке Ubuntu 16.04, в других системах устанавливаемые пакеты могут отличаться именами | |
2. Диск с Win 7, комплект драйверов и SPFlashTool для винды, на случай возникновения нештатной ситуации, как у меня было. Улыбающийся | |
Пренебрегать "соломкой" не следует. | |
3. Лупа! Сообщения на экране смарта в режиме отладки очень мелкие. | |
Итак: | |
1. Ставим на комп adb и fastboot, для Ubuntu - по инструкции Прошивка Android в Ubuntu c помощью ADB/Fastboot http://4pda.ru/pages/go/?u=https%3A%2F%2Fandroidp1.ru%2Fproshivka-android-v-ubuntu-c-pomoshhyu-adb-fastboot%2F&e=65163871 | |
Для этого нужно открыть терминал и ввести следующие команды: | |
Код: | |
sudo apt-get install android-tools-adb |
This file contains 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 install gource | |
git clone git://github.com/php/php-src.git php | |
cd php | |
git log --since=2012 --pretty=format:user:%aN%n%at --reverse --raw --encoding=UTF-8 --no-renames > php.2012.log | |
gource --seconds-per-day .05 1920x1080 --auto-skip-seconds .05 --multi-sampling --stop-at-end --highlight-users --hide mouse,progress --file-idle-time 13 --max-files 0 --background-colour 000000 --font-size 26 --logo php.png --output-ppm-stream - --output-framerate 30 php.2012.log | avconv -y -r 30 -f image2pipe -vcodec ppm -i - -b 32768k php.mp4 | |
//Что бы сохранить видео то | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4 |
NewerOlder