Skip to content

Instantly share code, notes, and snippets.

View alroniks's full-sized avatar

Ivan Klimchuk alroniks

View GitHub Profile
@alroniks
alroniks / .env
Last active July 7, 2023 06:48
TAO Development Docker Environment
MYSQL_PORT=33060
NGINX_PORT=80
PROJECT_NAME=tao
$get = $modx->sanitize($_GET);
if (!$get['day']) {
$now = time();
$day = date('Y-m-d', $now);
}
$day = $get['day'];
$step = 15; // minutes
@alroniks
alroniks / PULL_REQUEST_TEMPLATE.md
Created December 17, 2018 11:13
PR Template Suggestion

What does it do?

Describe the technical changes you did.

Why is it needed?

Describe the issue you are solving.

Related Jira Tickets / Pull Requests

Let us know if this is related to any issue/ticket/pull request.

@alroniks
alroniks / CustomSettingFields.php
Last active July 14, 2020 13:12
Custom ComboBox (list) as a value type for MODX system settings
<?php
if ('OnManagerPageBeforeRender' !== $modx->event->name) {
return; // exit if any other event happened
}
if ('system/settings' !== $_GET['a']) {
return; // exit if any other page than system settings loaded
}
@alroniks
alroniks / site-import.php
Created November 7, 2021 18:14
shopmanager.php
<?php
/**
Скрипт, который позволяет принимать запросы от shopmanager и обновлять информацию на сайте на базе MODX и miniSgop2,
при включенной интеграции.
Скрипт не закончен, потому использовать на свой страх и риск.
*/
declare(strict_types = 1);