- auto-detect-indentation
- tabs-to-spaces
- emmet
- atom-css-comb
- language-parser3
- atom-beautify
- minimap
- minimap-find-and-replace
- minimap-pigments
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 | |
function printMemory($start, $header) { | |
printf( | |
"%s - Time: %s | Memory (current): %s KB | Memory (max): %s KB" . PHP_EOL, | |
$header, | |
number_format(round((microtime(true) - $start) * 1000, 6), 6, ',', ''), | |
number_format(round((memory_get_usage() / 1024), 2), 2, ',', ''), | |
number_format(round((memory_get_peak_usage() / 1024), 2), 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
<?php | |
function printMemory($start, $header) { | |
printf( | |
"%s - Time: %s | Memory (current): %s KB | Memory (max): %s KB" . PHP_EOL, | |
$header, | |
number_format(round((microtime(true) - $start) * 1000, 6), 6, ',', ''), | |
number_format(round((memory_get_usage() / 1024), 2), 2, ',', ''), | |
number_format(round((memory_get_peak_usage() / 1024), 2), 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
<?php | |
function printMemory($start, $header) { | |
printf( | |
"%s - Time: %s | Memory (current): %s KB | Memory (max): %s KB" . PHP_EOL, | |
$header, | |
number_format(round((microtime(true) - $start) * 1000, 6), 6, ',', ''), | |
number_format(round((memory_get_usage() / 1024), 2), 2, ',', ''), | |
number_format(round((memory_get_peak_usage() / 1024), 2), 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
<?php | |
use DateTime; | |
use Exception; | |
use Psr\Cache\CacheItemPoolInterface; | |
use Psr\Log\LoggerInterface; | |
use src\Integration\DataProvider; | |
class DataProvider | |
{ |
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 declOfNum(number, titles) { | |
cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
use: | |
declOfNum(count, ['найдена', 'найдено', 'найдены']); |
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 | |
/* | |
* Событие - при изменении элемента проверяем значение свойства и меняем в активность элемента | |
*/ | |
/* | |
* Регистрация двух событий: | |
* OnBeforeIBlockElementAdd - перед добавление элемента | |
* OnBeforeIBlockElementAdd - перед изменением элемента |
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
$.extend($.datepicker,{_checkOffset:function(inst,offset,isFixed){return offset}}); | |
$("#datepicker").datepicker(); |
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 | |
abstract class __emarket_custom { | |
//TODO: Write here your own macroses | |
/* | |
* В файле - \classes\modules\emarket\__custom.php | |
* Пример вызова в TPL: <div>Стоимость доставки: %emarket newDeliveryPrice()%</div> | |
*/ | |
public function newDeliveryPrice($template = 'default'){ | |
$ini = cmsController::getInstance()->getModule("emarket"); |
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
.hyphenate { | |
overflow-wrap: break-word; | |
word-wrap: break-word; | |
-webkit-hyphens: auto; | |
-ms-hyphens: auto; | |
-moz-hyphens: auto; | |
hyphens: auto; | |
} |