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 | |
# Bitrix admin mode | |
if ($GLOBALS['USER']->IsAdmin()){ | |
print '<pre>'.var_dump($val).'</pre>'; | |
} | |
# Dev mode | |
if($_SERVER['REMOTE_ADDR'] == 'IP') { | |
print '<pre>'.var_dump($val).'</pre>'; |
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 | |
/* | |
* Bitrix init (paths to header/prolog/footer) | |
*/ | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php'); | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/footer.php'); | |
/* |
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 | |
/* | |
* Bitrix init (paths to header/prolog/footer) | |
*/ | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/header.php'); | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/include/prolog_before.php'); | |
require_once($_SERVER['DOCUMENT_ROOT'] . '/bitrix/footer.php'); | |
/* |
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 | |
/* | |
* Snippert for CRM entities: | |
* Lead - //ToDo | |
* Deal - //ToDo | |
* Invoice - //ToDo | |
* Company - //ToDo | |
* Contact - //ToDo | |
* Requisites - //ToDo |
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
/* | |
* JQuery | |
*/ | |
// document.on | |
$(document).on('click', '[data-element]', function(e){ | |
e.preventDefault(); | |
// some actions | |
}); |
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 some_settings = []; | |
function init_main(){ | |
} | |
$(function() { | |
init_main(); | |
// bitrix "onAjaxSuccess" event listener |
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
<scheme name="Darcula (Classic ASCII)" version="142" parent_scheme="Darcula"> | |
<metaInfo> | |
<property name="created">2020-11-01T00:00:00</property> | |
<property name="ide">PhpStorm</property> | |
<property name="ideVersion">2020.2.3.0.0</property> | |
<property name="modified">2020-11-01T00:00:00</property> | |
<property name="originalScheme">Darcula (Classic ASCII)</property> | |
</metaInfo> | |
<colors> | |
<option name="CONSOLE_BACKGROUND_KEY" value="0" /> |
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
# CentOS выбор основного редактора | |
export EDITOR=mcedit | |
#Grep: | |
grep -ilnr 'search' /indir --include=*.php | |
grep -ilnr 'search' /indir --exclude=*.php | |
grep -ilnr 'search' /indir --exclude-dir=cache | |
#CreateUser and Permissions: | |
useradd -s /bin/bash -d /home/iteelion -m -U -G user |
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
# Enable rewrite system (mail rules block) / Включить рерайты (блок для написания правил) | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
... any other rewrite rules here... | |
</IfModule> | |
# Redirect nowww to www / Редирект без www поддомена, на сайт с www | |
RewriteCond %{HTTP_HOST} !^www\. [NC] | |
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=302,L] |
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 | |
$eventManager = EventManager::getInstance(); | |
$eventManager->addEventHandler('main', 'OnEndBufferContent', ['\\App\\Event\\Optimization', 'deleteKernelJs']); | |
$eventManager->addEventHandler('main', 'OnEndBufferContent', ['\\App\\Event\\Optimization', 'deleteKernelCss']); | |
/** class **/ | |
namespace App\Event; |
OlderNewer