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/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
/* | |
* Многострочная запись в 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/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
/* | |
* 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
The MIT License | |
Copyright (c) 2019 @PlugFox | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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://t.me/rudart | |
* https://gist.github.com/PlugFox/6e79a1f5cc6e32a4df1081bd27edb38c | |
* https://dartpad.dartlang.org/6e79a1f5cc6e32a4df1081bd27edb38c | |
*/ | |
import 'dart:async'; | |
class MyString { | |
final StreamController<String> _sc = new StreamController<String>.broadcast(); |
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
/* | |
* Пример парсинга json с использованием каскадной нотации | |
* для https://t.me/rudart | |
* https://gist.github.com/PlugFox/0f4c182950895f7033d26204911dad6a/ | |
* https://dartpad.dartlang.org/0f4c182950895f7033d26204911dad6a | |
*/ | |
// Описание каскадной нотации: | |
// https://dart.dev/guides/language/language-tour#cascade-notation- |
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
/* | |
* Throttling and Debouncing in dart for https://pub.dev/packages/throttling | |
* https://gist.github.com/PlugFox/8630021e5c7ab9d27b74e86372f74c31 | |
* https://dartpad.dev?id=8630021e5c7ab9d27b74e86372f74c31 | |
* Matiunin Mikhail <plugfox@gmail.com>, 22 November 2023 | |
*/ | |
// ignore_for_file: avoid_print, cascade_invocations, unawaited_futures | |
import 'dart:async'; |