Skip to content

Instantly share code, notes, and snippets.

Nik Samokhvalov niksamokhvalov

Block or report user

Report or block niksamokhvalov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bbc-2.0
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");?>
<?$APPLICATION->IncludeComponent(
"bbc:elements",
".default",
array(
"IBLOCK_TYPE" => "news",
"IBLOCK_ID" => "6",
"SORT_BY_1" => "SHOWS",
"SORT_ORDER_1" => "ASC",
View App-class-example.php
<?php
use Bitrix\Main\Application;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;
use Monolog\Registry;
use Monolog\Formatter\LogstashFormatter;
use Monolog\Processor\WebProcessor;
/**
@niksamokhvalov
niksamokhvalov / phinx-migrate-all.php
Last active Mar 7, 2018
Phinx console command for execute migrations of the all shards
View phinx-migrate-all.php
<?php
/**
* Console command for Phinx with argument "all" for executed migrations for multiple databases.
*
* Structure directory for migrations and configs:
* ```
* migrations/
* .db1/
* .db2/
* .db3/
@niksamokhvalov
niksamokhvalov / Interface.php
Last active Sep 30, 2015
Пример описания интерфейса для «Админ-хелпера»
View Interface.php
<?php
/**
* Подразумевается, что для каждого админского раздела, пусть и в рамках одного модуля,
* будет создаваться свой interface.php
*/
namespace Vasya\Supermodule\HeaderFooter;
use DigitalWand\AdminHelper\AdminInterface;
class HeaderFooterInterface extends AdminInterface
@niksamokhvalov
niksamokhvalov / Declination numbers
Last active Sep 8, 2015
Function for declination numbers
View Declination numbers
/**
* Declination numbers
*
* @param int $num Number
* @param array $words Array with words
* @example declension(3, ['попугай', 'попугая', 'попугаев'])
*
* @return string
*/
function declension($num, $words)
You can’t perform that action at this time.