Skip to content

Instantly share code, notes, and snippets.

git config --global color.ui auto &&
git config --global color.branch auto &&
git config --global color.status auto &&
git config --global core.autocrlf false &&
git config --global core.quotepath false
git config --global pack.windowMemory "100m" &&
git config --global pack.packSizeLimit "100m" &&
git config --global pack.threads "1"
<?
$arData = array();
$cacheId = "cache_id/{$id}";
$cacheDir = $cacheId;
$cacheTag = "iblock_id_{$iblock}";
$cacheTime = 360000;
$cache = \Bitrix\Main\Data\Cache::createInstance();
https://devcenter.heroku.com/articles/getting-started-with-laravel
<snippet>
<content><![CDATA[
if(!Bitrix\Main\Loader::includeModule("iblock"))return;
\$arItems = array();
\$arOrder = array(${1:"sort" => "asc"${2:, "date_active_from" => "desc"}});
\$arFilter = array(
${4:"ACTIVE" => "Y", "ACTIVE_DATE" => "Y",
"IBLOCK_ID" => ${3:SOME}_IBLOCK,}${5}
);
npm install 'gulpjs/gulp.git#4.0' --save-dev
npm install gulp-sass gulp-concat gulp-uglify gulp-watch gulp-clean-css gulp-rename --save-dev
{
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Tomorrow.tmTheme",
"disable_tab_abbreviations_on_auto_complete": false,
"draw_indent_guides": true,
"draw_white_space": "all",
"fallback_encoding": "Cyrillic (Windows 1251)",
"font_size": 14,
"highlight_line": true,
"ignored_packages":
[
{
"disable_tab_abbreviations_on_auto_complete": false,
"draw_indent_guides": true,
"draw_white_space": "all",
"fallback_encoding": "Cyrillic (Windows 1251)",
"font_size": 14,
"highlight_line": true,
"show_encoding": true,
"tab_size": 4,
"translate_tabs_to_spaces": false,
<snippet>
<content><![CDATA[
foreach(\$${1:arResult['ITEMS']} as \$${2:key => }\$${3:arItem}):?>
<?=\$${3:arItem}['${4:NAME}']?>${0}
<?endforeach;?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>fore</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
<?
define('LOG_FILENAME', __DIR__.'/log/'.date('Ymd').'.log');
require_once($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/main/include/prolog_before.php');
use Bitrix\Main\Loader;
Loader::includeModule("iblock");
Uplab\Helper::loadMainMsg();
use Bitrix\Main\Localization\Loc;
<!-- for result_modifier.php -->
<snippet>
<content><![CDATA[
echo "<pre ${1:style='display:none;'}>";
print_r(\$${2:arResult});
echo "</pre>";
${0}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>prr</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->