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
/* Получаем и кешируем информацию о разделах(sections) */ | |
// должен быть подключен CModule::IncludeModule("iblock"); | |
!!!!!!! $_sections_iblock_id = .укажи id инфоблока | |
$obCache = new CPHPCache; | |
if($obCache->InitCache(24*60, 'list_sections', '/cache_path/' ){ | |
$vars = $obCache->GetVars(); | |
$sections = $vars["sections"]; | |
$sections_by_code = $vars["sections_by_code"]; | |
} else if($obCache->StartDataCache()) { |
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
// http://www.php.su/functions/?fopen | |
$filecontent = 'some content'; | |
$file = fopen($_SERVER["DOCUMENT_ROOT"]."/path/name.txt","w+"); | |
fputs($file, $filecontent); | |
fclose($file); |
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 | |
/* | |
* Опиши тут, что это за файл! | |
* | |
*/ | |
// define('SITE_TEMPLATE_ID','main'); | |
require($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/main/include/prolog_before.php'); | |
// CModule::IncludeModule("iblock"); | |
// CModule::IncludeModule("forum"); |
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
<?$APPLICATION->IncludeFile( | |
$APPLICATION->GetTemplatePath("include_areas/filename.php"), | |
Array(), | |
Array( | |
"MODE"=>"text" | |
//"MODE"=>"html" | |
//"MODE"=>"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
<?$APPLICATION->IncludeComponent("bitrix:search.page", "", array( | |
"RESTART" => "N", | |
"NO_WORD_LOGIC" => "N", | |
"CHECK_DATES" => "N", | |
"USE_TITLE_RANK" => "N", | |
"DEFAULT_SORT" => "rank", | |
"FILTER_NAME" => "", | |
"arrFILTER" => array( | |
0 => "no", | |
), |
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
#!/bin/bash | |
clear | |
echo '' | |
echo '' | |
echo ' !!! ВНИМАНИЕ !!! ' | |
echo ' Ознакомьтесь с инструкцией http://habrahabr.ru/post/235523/' | |
echo '' | |
echo ' Всё что вы делаете вы делаете на свой страх и риск' | |
echo '' | |
echo 'Нажмити Enter для продолжения' |
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
#!/bin/sh | |
# | |
if git rev-parse --verify HEAD >/dev/null 2>&1 | |
then | |
against=HEAD | |
else | |
# Initial commit: diff against an empty tree object | |
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 | |
fi |
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
<stat> | |
<script> | |
this.on('mount', ()=>{ | |
}) | |
</script> | |
<stat> | |
</stat> | |
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
0x0B5A5c67d302645A7781797faF1bc78361c9D4a8 |
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
// https://moment.github.io/luxon/docs/manual/math.html#time-math | |
const { DateTime } = require('luxon') | |
const myRoundDates = function (birthday_str){ | |
const typesArr = {'years':'лет','months':'месяцев','weeks':'недель','days':'дней'} | |
const roundDates = {} | |
// Округление до ближайшего большего круглого значения | |
// в соответствии с разрядом числа |
OlderNewer