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
// ==UserScript== | |
// @name medium-dark | |
// @namespace plugfox | |
// @version 2024-03-19 | |
// @description Dark Mode for Medium | |
// @author plugfox | |
// @run-at document-start | |
// @homepage https://gist.github.com/PlugFox/0795e7ffb4fe4b190fafc734bc5a63a5 | |
// @homepageURL https://gist.github.com/PlugFox/0795e7ffb4fe4b190fafc734bc5a63a5 | |
// @match *://medium.com/* |
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
/* | |
* Update JSON String | |
* https://gist.github.com/ziqq/19a6de0ef7db6ca96a0603e470c6cfc0 | |
* https://dartpad.dev?id=19a6de0ef7db6ca96a0603e470c6cfc0 | |
* Anton Ustinoff <a.a.ustinoff@gmail.com>, 25 April 2024 | |
*/ | |
import 'dart:convert'; | |
void main() { |
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
/* | |
* Sunflower | |
* https://gist.github.com/PlugFox/9d251f3300804746884e2c2f8824babb | |
* https://dartpad.dev?id=9d251f3300804746884e2c2f8824babb | |
* Mike Matiunin <plugfox@gmail.com>, 06 March 2024 | |
*/ | |
import 'dart:async'; | |
import 'dart:math' as math; |
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
/* | |
* Stream async expand | |
* https://gist.github.com/PlugFox/0366eb6d7bd2f3e03fd629c5a96ea8ff | |
* https://dartpad.dev?id=0366eb6d7bd2f3e03fd629c5a96ea8ff | |
* Mike Matiunin <plugfox@gmail.com>, 07 March 2024 | |
*/ | |
import 'dart:async'; | |
import 'package:flutter/material.dart'; |
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
/* | |
* Phone formatter | |
* https://gist.github.com/PlugFox/198e8b02565541cfaec4e7e4e1d1359c | |
* https://dartpad.dev/198e8b02565541cfaec4e7e4e1d1359c | |
* | |
* ^(?<country>8|\+7|\+375)?[\-\s\.]*[(]?s?(?<region>[0-9]{1,5})s?[)]?[\-\s\.]*(?<abonent1>[\d]{2,5})[\-\s\.]*(?<abonent2>[\d]{2})[\-\s\.]*(?<abonent3>[\d]{2})[\s]+((доб|#|ext|вн)[а-яa-z\.]{0,7}[\s]?(?<ext>[\d]{1,5})?)?$ | |
*/ | |
/// Source phones | |
const List<String> phones = <String>[ |
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
/// Base interface | |
import 'remote_config_base.dart'; | |
/// Conditional import | |
import 'remote_config_mobile.dart' | |
// ignore: uri_does_not_exist | |
if (dart.library.html) 'remote_config_web.dart'; | |
... | |
final config = await getRemoteConfig(); |
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
/* | |
* Date time parse and format as ISO-8601 with local timezone | |
* https://gist.github.com/PlugFox/339bcd8dbec29a56fd53f8e0656e4a54 | |
* https://dartpad.dev/339bcd8dbec29a56fd53f8e0656e4a54?id=&null_safety=true | |
*/ | |
import 'dart:async'; | |
import 'package:intl/intl.dart' as intl; | |
const String source = '2021-01-02T03:08:04+02:30'; |
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
/* | |
* Generate from CSV, TSV | |
* https://gist.github.com/PlugFox/d488cef8f605e5b7ea3433d49fd21f00 | |
* https://dartpad.dev/d488cef8f605e5b7ea3433d49fd21f00?id=&null_safety=true | |
*/ | |
import 'dart:math' as math; | |
void main() { | |
final list = data.split('\n').toList(); | |
final space = ' '.codeUnits.first; |
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
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'dart:math'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(new MyApp()); | |
} |
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
import 'dart:collection'; | |
import 'dart:convert'; | |
import 'dart:typed_data'; | |
import 'package:collection/collection.dart'; | |
import 'package:crypto/crypto.dart'; | |
import 'package:meta/meta.dart'; | |
/// Токен JWT состоит из трех частей: заголовка (header), полезной нагрузки (payload) и подписи или данных шифрования. | |
/// Первые два элемента — это JSON объекты определенной структуры. |
NewerOlder