ES6ValidationInspection
JSAccessibilityCheckInspection
JSBitwiseOperatorUsageInspection
JSCheckFunctionSignaturesInspection
JSClosureCompilerSyntaxInspection
JSCommentMatchesSignatureInspection
JSComparisonWithNaNInspection
Метод используется для идентификации административного раздела сайта /bitrix/admin/
. Возвращает true
если в этом разделе, и false
в остальных случаях
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 | |
use Bitrix\Main\Diag\Debug; | |
use Bitrix\Main\Diag\Helper; | |
/*Write in file*/ | |
//Debug::writeToFile($variable, $varName, $file); | |
Debug::writeToFile(['ID' => $ID, 'fields' => $arResult ], null, "log.log"); | |
Debug::dumpToFile(['ID' => $ID, 'fields' => $arResult ], null, "log.log"); | |
/*Time label*/ |
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 | |
/** | |
* Возвращает нужную форму множественного числа в зависимости от количества | |
* | |
* Пример вызова: | |
* pluralForm(1, ["рубль", "рубля", "рублей"]); | |
* | |
* @param float|int $number Число | |
* @param string[3] $titles Подписи для 1, 3 и 5 |
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 | |
/** | |
* Возвращает нужную форму множественного числа в зависимости от количества | |
* | |
* Пример вызова: | |
* pluralForm(1, ["рубль", "рубля", "рублей"]); | |
* | |
* @param float|int $number Число | |
* @param string [3] $titles Подписи для 1, 3 и 5 |
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 array $arResult */ | |
/** @var array $arItem */ | |
foreach ($arResult as $arItem) | |
{ | |
// [...] | |
if ($arItem["IS_PARENT"]) | |
{ | |
global $APPLICATION; |
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 | |
/** | |
* Класс BrowserConsoleDebug | |
* | |
* Выводит отладочную информацию в консоль браузера. | |
* | |
* Может использоваться в качестве обработчика ошибок Битрикс. | |
* | |
* Для этого необходимо прописать его в /bitrix/.settings.php |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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 | |
# This has to be run from master | |
git checkout master | |
# Update our list of remotes | |
git fetch | |
git remote prune origin | |
# Remove local fully merged branches | |
git branch --merged master | grep -v 'master$' | grep -v 'dev$' | xargs git branch -d |
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
#!/usr/bin/env fail2ban-python | |
import sys | |
def process_args(argv): | |
if len(argv) != 2: | |
sys.stderr.write("Please provide a single IP as an argument. Got: %s\n" | |
% (argv[1:])) | |
sys.exit(2) |
OlderNewer