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
#Область ПреобразоватьВДату | |
// Возвращает неопределено в случае ошибки | |
// | |
// Дата может передаваться в следующих видах: | |
// | |
// В виде строки с разделителями | |
// | |
// Время, в случае наличия, обязано разделятся символом “:” | |
// День, Месяц, Год обязаны отделяться друг от друга произвольными символами или пробелами | |
// Время может состоять только из часов и минут, секунды опциональны |
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
Функция ПолучитьТаблицуЗначенийПоздравлений(ТекущаяДата = Неопределено, МассивФизическихЛиц = Неопределено, ТолькоСотрудники = Неопределено, ПоздравитьСегодня = Ложь) Экспорт | |
ТекущаяДата = ?(ТекущаяДата = Неопределено, ТекущаяДата(), ТекущаяДата); | |
Запрос = Новый Запрос; | |
ТекстЗапроса = " | |
|// ВЫБЕРЕМ НАЧАЛО ОТБОРА ДНЕЙ РОЖДЕНИЙ | |
|// ЕСЛИ ПРЕДИДУЩИЙ ДЕНЬ - ВЫХОДНОЙ, ТО НАЧАЛО ПЕРИОДА ЭТИХ ВЫХОДНЫХ | |
|// В ПРОТИВНОМ СЛУЧАЕ - ТЕКУЩУЮ ДАТУ | |
|ВЫБРАТЬ ЕСТЬNULL(МИНИМУМ(Вых.Дата), &тДата) КАК Дата | |
|ПОМЕСТИТЬ втНачалоПериодаТекущихПоздравлений | |
|ИЗ РегистрСведений.ДанныеПроизводственногоКалендаря КАК Вых |
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
``` | |
server { | |
listen 80; | |
server_name tg.domain.tld; | |
location / { | |
proxy_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Server $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass https://api.telegram.org/; | |
client_max_body_size 100M; |
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
[Unit] | |
Description=auth-callback | |
After=network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/var/www/domain.tld/callback | |
RemainAfterExit=false | |
RestartSec=5s | |
ExecStart=/var/www/domain.tld/callback/callback.run |
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://gist.github.com/PlugFox/2466b8f34183743281be0a9fa155a777 | |
* https://dartpad.dartlang.org/2466b8f34183743281be0a9fa155a777 | |
*/ | |
import "dart:async"; | |
class KeepAlive { | |
static const _lockSecondsCountdown = 10; | |
static const _timeout = const Duration(seconds: 1); |
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://gist.github.com/PlugFox/8cdfd371fcf14bf653f28719bf2e5cb1 | |
* https://dartpad.dartlang.org/8cdfd371fcf14bf653f28719bf2e5cb1 | |
*/ | |
class IStoreDataForYou { | |
int myValue; | |
// SINGLETON + | |
IStoreDataForYou._(); |
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://gist.github.com/PlugFox/bf01b1bff1df772aadcbcc5031719a79 | |
* https://dartpad.dartlang.org/bf01b1bff1df772aadcbcc5031719a79 | |
*/ | |
import 'dart:async'; | |
class Demo { |
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
/* | |
* Многострочная запись в dart | |
* https://gist.github.com/PlugFox/de8129130c0bfe91276e43dccce7becd | |
* https://dartpad.dartlang.org/de8129130c0bfe91276e43dccce7becd | |
*/ | |
void main() { | |
final String msg = ''' | |
|--------------- | |
| MESSAGE |
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://gist.github.com/PlugFox/cec72af345db58cc8911f012d138a8a0 | |
* https://dartpad.dartlang.org/cec72af345db58cc8911f012d138a8a0 | |
*/ | |
class DateRange { | |
DateTime begin = new DateTime(1); | |
DateTime end = new DateTime(1); | |
int get length => _dateToDays(this.end)-_dateToDays(this.begin); |
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://dartpad.dartlang.org/d24227a09cbc4ea5fd5b2305e6ec4b68 | |
* https://gist.github.com/PlugFox/d24227a09cbc4ea5fd5b2305e6ec4b68 | |
*/ | |
import 'dart:async'; | |
abstract class Group { | |
List<Element> _children = <Element>[]; |