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
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD | |
git push --force |
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
Header edit Set-Cookie ^(.*)$ $1;SameSite=None;Secure |
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
// 1. добавление | |
$element = $agileCommandsClass::getByPrimary( | |
$agileTeam_id , | |
['select' => array('ID', 'NAME', 'USERS')] | |
)->fetchObject(); | |
$element->addToUsers(new PropertyValue(233973)); | |
$element->save(); | |
// 2. удаление из множественного значниея. | |
$element = \Bitrix\Iblock\Elements\ElementAgilecommandTable::getByPrimary( 193574 , array( // $ELEMENT_ID - id елемента |
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 | |
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) { | |
die(); | |
} | |
class AgileUsersTablesComponent extends \CBitrixComponent | |
{ | |
public function onPrepareComponentParams($arParams) | |
{ | |
return $arParams; |
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
` | |
<? | |
$arTasks = CIBlockRights::GetRightsList(); // получаем массив уровней доступа | |
$object = new CIBlockElementRights($iblockID, $elementID); // создаём объект прав, передав в него id инфоблока и id элемента | |
$arRights = $object->GetRights(); // получим права для элемента | |
$object->SetRights($arRights); // установим права для | |
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
<?php | |
ini_set('error_reporting', E_ALL); | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
//amo | |
//ПРЕДОПРЕДЕЛЯЕМЫЕ ПЕРЕМЕННЫЕ | |
$responsible_user_id = 1665910; //id ответственного по сделке, контакту, компании | |
$lead_name = 'Заявка с сайта'; //Название добавляемой сделки |
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 (window.performance && window.performance.navigation.type === window.performance.navigation.TYPE_BACK_FORWARD) { | |
alert('Got here using the browser "Back" or "Forward" button.'); | |
console.log($('.js-tabs__block.open #searchForm').find('input').val()); | |
} |
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
# 302 редирект | |
RewriteCond %{REQUEST_URI} /documents/obnovleniya-v-rabote-platformy/$ | |
RewriteRule ^(.*)$ http://%{SERVER_NAME}/documents/poryadok-raboty-platformy/ [R=302,NC,L] | |
# 301 редирект | |
Redirect 301 /dir1/ http://%{SERVER_NAME}/dir2/ |
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
SELECT id, name, description | |
FROM products | |
ORDER BY CASE WHEN name LIKE '%string%' THEN 2 WHEN description LIKE '%string%' THEN 1 ELSE 0 END DESC, name |
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
# -m - создание директории | |
sudo useradd -m login | |
# usermod -aG - добавлить пользователя в группу sudo | |
sudo usermod -aG sudo login | |
# установить пароль | |
sudo passwd login |
NewerOlder