Skip to content

Instantly share code, notes, and snippets.

View maxsbelt's full-sized avatar
🏠
Working from home

Sergey Makarov maxsbelt

🏠
Working from home
View GitHub Profile
@maxsbelt
maxsbelt / gist:4476270
Last active March 27, 2024 10:22
BITRIX: Описание возможностей CMS 1C-Bitrix для создания файла описания параметров модуля options.php.
<?
$MODULE_ID = "Идентификатор модуля".
// -------------- СОХРАНЕНИЕ --------------
// ПО ОТДЕЛЬНОСТИ
foreach($arOptions as $arOption) {
__AdmSettingsSaveOption($MODULE_ID, $arOption);
}
@maxsbelt
maxsbelt / setpropertyvalues.php
Last active October 31, 2018 05:15
BITRIX: Заметка по CIBlockElement::SetPropertyValues()
<?
// тип: Строка / (множ) строка
$arPropertyValues = array(
"STRING" => "some string",
"STRING_MULTIPLE" => array(
"first row",
"second row",
"third row"
)
@maxsbelt
maxsbelt / from_styled_ns.js
Last active October 23, 2020 17:36
styled-components with namespaces
import styled from 'styled-components'
export * from 'styled-components'
const getNamespace = props => props.theme.namespace || ''
const isPure = args =>
(args.length === 1 && args[0] === '') ||
args.find(arg => arg === getNamespace)
const tag = method => (...args) => {
if (isPure(args)) return method(...args)
@maxsbelt
maxsbelt / README.md
Last active August 20, 2023 06:25
node installation instruction (nodenv)

ndenv uninstallation (if necessary)

If you already have ndenv on your computer you need to remove it (it's not supported anymore). Remove commands related to ndenv from ~/.bash_profile file:

# remove those lines
export PATH="$HOME/.ndenv/bin:$PATH"
eval "$(ndenv init -)"

PR Checklist

  • I've read and followed the Pull Request Checklist
  • I added JIRA ticket ID to my PR title (e.g. [ADAPP-0000]) and linked it into the description
  • My code nicely falls back if we get bad or unexpected data (preventing PANICs)
  • If UI related, I've included screenshots or screencapture of the change.
  • If added/changed translations, I've added [LEXI] tag in PR title and linked translation keys in the description
  • If there are any related PRs to other repos, I've added links on those PRs in corresponded section
  • I have added tests that prove my fix is effective or that my feature works (if needed)
  • I added unique datatest-id for Pedo/Regression (if needed)
JVBERi0xLjMKJf////8KOCAwIG9iago8PAovVHlw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