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
var cont = document.getElementsByTagName('head')[0]; | |
var jsList = [ | |
{src: '/static/inner/js/libs.js', async: true, defer: true}, | |
{src: '/local/templates/inner/assets-prog/dist/script.min.js', async: true, defer: true}, | |
{ | |
src: 'https://maps.googleapis.com/maps/api/js?libraries=places&key=YOUR_API_KEY', | |
onLoad: function () { | |
setTimeout(function () { | |
$(window).trigger('google:map:ready'); |
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
<? | |
$arUrlRewrite = array( | |
array( | |
"CONDITION" => "~^/personal/projects/requests/(\\d+)/(\\?.*|\$)(?#__rule_sort_hack__)~", | |
"RULE" => "id=\$1", | |
"ID" => "", | |
"PATH" => "/personal/projects/requests/detail.php", | |
"SORT" => 100, | |
), | |
array( |
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
find . -name \*.jpg -type f -exec jpegoptim --strip-all {} \; | |
find . -name \*.png -type f -exec optipng -o7 {} \; |
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
# Removes index.php from ExpressionEngine URLs | |
RewriteCond %{REQUEST_URI} !^/bitrix/ | |
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC] | |
RewriteRule (.*?)index\.php/*(.*) /$1$2 [L,NE,R] # <- for test, for prod use [L,NE,R=301] | |
# Adds trailing slashes | |
RewriteCond %{REQUEST_URI} !^/bitrix/ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*[^/])$ /$1/ [L,NE,R] # <- for test, for prod use [L,NE,R=301] |
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
<? | |
defined("B_PROLOG_INCLUDED") && B_PROLOG_INCLUDED === true || die(); | |
if (!Bitrix\Main\Loader::includeModule("iblock")) return; | |
/** | |
* Когда нужно выводить элементы и получать из них разделы | |
* @source: https://gist.github.com/geff21st/fbf0abeb5422678e4622ccc288a10dac | |
* @global CMain $APPLICATION | |
* @var array $arParams | |
* @var array $arResult | |
*/ |
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
<? | |
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); | |
/** | |
* @global CMain $APPLICATION | |
* @var array $arParams | |
* @var array $arResult | |
*/ |
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
<? | |
$arFilter = array("IBLOCK_ID" => $arResult["IBLOCK_ID"], "ACTIVE" => "Y"); | |
if (!empty($arResult["IBLOCK_SECTION_ID"])) { | |
$arFilter["IBLOCK_SECTION_ID"] = $arResult["IBLOCK_SECTION_ID"]; | |
} | |
$resNav = CIBlockElement::GetList( | |
array( | |
$arParams['SORT_BY1'] => $arParams['SORT_ORDER1'], | |
$arParams['SORT_BY2'] => $arParams['SORT_ORDER2'], |
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
[alias] | |
pll = !git pull origin `git rev-parse --abbrev-ref HEAD` | |
psh = !git pll && git push origin `git rev-parse --abbrev-ref HEAD` | |
upd = !git add . && git stash && git pull origin `git rev-parse --abbrev-ref HEAD` && git stash pop && git stash clear && git status | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit |
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
<? | |
define('LOG_FILENAME', __DIR__.'/log/'.date('Ymd').'.log'); | |
require_once($_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/main/include/prolog_before.php'); | |
?> | |
<? foreach ($arResult["ITEMS"] as $arItem): ?> | |
<? | |
$this->AddEditAction( | |
$arItem["ID"], $arItem["EDIT_LINK"], |