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
* скачал https://getcomposer.org/installer назвал composer-setup.php | |
* настроил локальный .\php.ini | |
* extension_dir = "ext" | |
* extension=openssl | |
* Запуск инсталла композера | |
* .\php.exe -c .\php.ini .\composer-setup.php | |
* Установка модулей composer.json (там прописал https://github.com/Corveda/PHPSandbox#installation) | |
* .\php.exe -c .\php.ini .\composer.phar install --dry-run | |
* .\php.exe -c .\php.ini .\composer.phar install |
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
/* eslint-disable no-trailing-spaces */ | |
/* eslint-disable no-magic-numbers */ | |
/* eslint-disable line-comment-position */ | |
/* tslint:disable */ | |
console.info(` | |
_ _ | |
___ __ __ _ __ ___ _ __ | |_ _ __ ___ (_) ___ | |
/ _ \\ \\ \\/ / | '_ \\ / _ \\ | '__| | __| _____ | '_ \\ / _ \\ | | / __| |
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
-- | |
-- Name: контрагенты/проверка ИНН(integer, jsonb); Type: FUNCTION; Schema: public; Owner: - | |
-- | |
CREATE FUNCTION public."контрагенты/проверка ИНН"(id integer, attrs jsonb) RETURNS boolean | |
LANGUAGE plpgsql | |
AS $_$ | |
BEGIN | |
IF $2 is null or $2->>'ИНН' is null or $2->>'ИНН'='' THEN |
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
CREATE TEMP TABLE users ( | |
id SERIAL PRIMARY KEY, | |
name TEXT not null | |
); | |
CREATE INDEX ON users (name); -- сортировка | |
CREATE TEMP TABLE history ( | |
id SERIAL PRIMARY KEY, | |
ts TIMESTAMP NOT NULL default now()+(random()::numeric::text || ' days')::interval, |
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
perlbrew use perl-5.32.1 | |
cpanm Net::SSLeay | |
cpanm IO::Socket::SSL | |
cpanm [email protected] | |
cpanm Mojo::[email protected] | |
cpanm Mojo::Pg::[email protected] | |
cpanm Mojo::Log::[email protected] | |
cpanm Mojolicious::[email protected] | |
cpanm [email protected] | |
cpanm DBIx::Mojo::[email protected] |
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
perl -MExtUtils::Installed -e 'my $inst = ExtUtils::Installed->new(); foreach $module ($inst->modules()) { print $module ."@". $inst->version($module). "\n"; }' |
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
package model | |
/********* | |
корень | |
+----migrations | |
| +----- 1.2.0 | |
| | +------ #8563.up.sql | |
| | +------ #8563.down.sql | |
| | +------ #.....up.sql |
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
// Если нужно, запускай функционал периодического архивирования, настройки: Settings.FileZipBounce и Settings.ZipArchiveRemoveBounce | |
func StartZipTicker () { | |
go func() { | |
ticker := time.NewTicker(time.Duration(time.Minute)) | |
for range ticker.C { | |
compressLogFiles() | |
clearOldZipFiles() | |
} | |
}() | |
} |
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
package main | |
import ( | |
"log" | |
"time" | |
) | |
const ( | |
queueLimit = 5 | |
taskLimit = 20 |
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 (без звездочки) и 2 (со звездочкой в начале первой строки) | |
Раздпелитель свопнутой второй группы на выходе - ** |
NewerOlder