-
Устанавливаем ГОСТ-овское шифрование
sudo apt install libengine-gost-openssl1.1
-
Правим конфиг
sudo nano /etc/ssl/openssl.cnf
-
В начало файла:
openssl_conf = openssl_def
const MORSE_CODE = [ | |
'-.-.--' => '!', | |
'.-..-.' => '"', | |
'...-..-' => '$', | |
'.-...' => '&', | |
'.----.' => '\'', | |
'-.--.' => '(', | |
'-.--.-' => ')', | |
'.-.-.' => '+', | |
'--..--' => ',', |
<?php | |
if (!defined('B_PROLOG_INCLUDED') || B_PROLOG_INCLUDED !== true) die(); | |
/** | |
* Раскладывает одноуровневый массив пунктов bitrix:menu в иерархию: | |
* дочерние пункты меню попадают в массив CHILDREN родительского. | |
* | |
* @param array $arResult | |
* @return array |
Устанавливаем ГОСТ-овское шифрование
sudo apt install libengine-gost-openssl1.1
Правим конфиг
sudo nano /etc/ssl/openssl.cnf
В начало файла:
openssl_conf = openssl_def
# /etc/systemd/system/dory.service | |
# https://github.com/FreedomBen/dory | |
[Unit] | |
Description=Dory service | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
User=root |
#!/usr/bin/env fail2ban-python | |
import sys | |
def process_args(argv): | |
if len(argv) != 2: | |
sys.stderr.write("Please provide a single IP as an argument. Got: %s\n" | |
% (argv[1:])) | |
sys.exit(2) |
#!/bin/bash | |
# This has to be run from master | |
git checkout master | |
# Update our list of remotes | |
git fetch | |
git remote prune origin | |
# Remove local fully merged branches | |
git branch --merged master | grep -v 'master$' | grep -v 'dev$' | xargs git branch -d |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?php | |
/** | |
* Класс BrowserConsoleDebug | |
* | |
* Выводит отладочную информацию в консоль браузера. | |
* | |
* Может использоваться в качестве обработчика ошибок Битрикс. | |
* | |
* Для этого необходимо прописать его в /bitrix/.settings.php |
<?php | |
/** @var array $arResult */ | |
/** @var array $arItem */ | |
foreach ($arResult as $arItem) | |
{ | |
// [...] | |
if ($arItem["IS_PARENT"]) | |
{ | |
global $APPLICATION; |
<?php | |
/** | |
* Возвращает нужную форму множественного числа в зависимости от количества | |
* | |
* Пример вызова: | |
* pluralForm(1, ["рубль", "рубля", "рублей"]); | |
* | |
* @param float|int $number Число | |
* @param string [3] $titles Подписи для 1, 3 и 5 |