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($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); | |
/* | |
* "восстановитель" значений в seo-вкладке для подразделов | |
* алгоритм: на входе имеем список ID разделов. Проходим по этому списку, проверяем, что у раздела с таким ID есть подразделы. | |
* Если они есть, то прописываем им дефолтные значения - при условии, что там вообще ничего не прописано | |
* (то есть во всей вкладке seo у такого подраздела сняты флажки). | |
*/ | |
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
Show hidden characters
// Settings in here override those in "Default/Preferences.sublime-settings", | |
// and are overridden in turn by file type specific settings. | |
{ | |
"translate_tabs_to_spaces": false, | |
//"dictionary": "Packages/Language - English/en_US.dic", | |
//"draw_white_space": "all", | |
"fallback_encoding": "Cyrillic (Windows 1251)", | |
"default_line_ending": "unix", | |
"auto_complete_commit_on_tab": true, | |
"shift_tab_unindent": true, |
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
<? | |
/** | |
* @param float $total | |
* @param string $one | |
* @param string $two | |
* @param string $five | |
* @return string | |
*/ | |
function strEnd($total, $one, $two, $five) { | |
if($total > floor($total)) return $two; |
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
#!/bin/bash | |
## | |
# Обновление тестовых версий (EAP) сред разработки компании JetBrains для Linux. | |
# В данном случае скачивается PhpStorm, но скрипт подойдёт для любой среды разработки, | |
# выкладываемой компанией JetBrains в EAP. | |
# | |
# | |
# @author MaximAL | |
# @since 2015-04-10 | |
# @copyright © MaximAL 2015 |
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
Заметки по Матрёшке. | |
Объяснение, как же работает .bindNode: | |
возьмем пример из документации: | |
var Application = Class({ | |
'extends': Matreshka, | |
constructor: function() { | |
// связываем свойство x и текстовое поле |
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
/* | |
сервер генерирует форму. Часть полей - обязательны. Обязательные поля имеют css-класс required. | |
На текущий момент проверка на валидность - это "длина значения больше нуля?" либо проверка на ненулевое значение | |
Если поле невалидно, то на него навешивается css-класс error | |
валидация происходит либо при отправке формы (для всех полей), либо при изменении содержимого поля (с дебаунсом) | |
*/ | |
var Field = Class({ |
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
function prepare_query(event){ | |
if (Ajax.activeRequestCount == 0) { | |
var a = Event.findElement(event, "a"); | |
var attribute = a.readAttribute('data-attribute') || ""; | |
var option = a.readAttribute('data-option') || ""; | |
if(typeof window.layerFilters === 'undefined'){ | |
window.layerFilters = query2array(window.location.href.split('?')[1]); | |
} |
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("LANG", "ru"); | |
define("NO_KEEP_STATISTIC", true); | |
define("NOT_CHECK_PERMISSIONS", true); | |
define("BX_BUFFER_USED", true); | |
// это отключает исполнение агентов | |
define("BX_CLUSTER_GROUP", 2); |
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
<?xml version="1.0" encoding="utf-8" ?> | |
<!-- disable backup globals for boosting --> | |
<phpunit bootstrap="bootstrap.php" backupGlobals="false"> | |
<testsuites> | |
<testsuite name="bla-bla-bla"> | |
<!-- all tests in that dir --> | |
<directory>./subdir</directory> | |
</testsuite> | |
</testsuites> | |
</phpunit> |