Skip to content

Instantly share code, notes, and snippets.

View PlugFox's full-sized avatar
🦊
🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊

Plague Fox PlugFox

🦊
🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊
View GitHub Profile
@PlugFox
PlugFox / clean-builds.sh
Created April 23, 2026 22:06
Clean builds script
#!/usr/bin/env bash
# Clean build/cache directories for Dart, TS, Rust and other common tooling.
# Usage:
# ./clean-builds.sh # dry-run: shows what would be deleted and total size
# ./clean-builds.sh --apply # actually delete
# ./clean-builds.sh --apply -y # delete without confirmation
set -euo pipefail
ROOT="${ROOT:-$(pwd)}"
@PlugFox
PlugFox / README.md
Created April 7, 2026 23:52
ChatScrollView vs ListView.builder β€” Benchmark Report

ChatScrollView vs ListView.builder β€” Benchmark Report

Environment

  • Flutter 3.32.2, Dart 3.8.2, macOS ARM64
  • Viewport: 400x800 logical pixels
  • Test runner: flutter test (headless, no GPU compositing)
  • Date: 2026-04-08
  • 42 tests, all passing
@PlugFox
PlugFox / telegram.bsl
Last active April 8, 2026 02:50
ΠžΡ‚ΠΏΡ€Π°Π²ΠΊΠ° Π’Π°Π±Π»ΠΈΡ‡Π½Ρ‹ΠΉΠ”ΠΎΠΊΡƒΠΌΠ΅Π½Ρ‚ Π² Ρ‚Π΅Π»Π΅Π³Ρ€Π°ΠΌ
/// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/// The MIT License
///
/// Copyright (c) 2019 Plague Fox
///
/// 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
@PlugFox
PlugFox / main.dart
Last active March 29, 2026 12:41
Sunflower V2 β€” 100K animated dots on a single layer with spring physics
/*
* Sunflower V2 β€” 100K animated dots on a single layer with spring physics.
* https://gist.github.com/PlugFox/0a0ee8ba7dc3679b86f2d8b4aab01569
* https://dartpad.dev?id=0a0ee8ba7dc3679b86f2d8b4aab01569
* Mike Matiunin <plugfox@gmail.com>, 26 March 2026
*/
//ignore_for_file: curly_braces_in_flow_control_structures
import 'dart:async';
@PlugFox
PlugFox / id_pool.dart
Created March 25, 2026 07:53
Id Pool for Dart & Flutter
import 'dart:typed_data';
/// ΠŸΡƒΠ» ΠΎΠ±ΡŠΠ΅ΠΊΡ‚ΠΎΠ² с цСлочислСнными ΠΈΠ΄Π΅Π½Ρ‚ΠΈΡ„ΠΈΠΊΠ°Ρ‚ΠΎΡ€Π°ΠΌΠΈ ΠΈ ΠΏΠ΅Ρ€Π΅ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ΠΌ ID.
///
/// Π’Π½ΡƒΡ‚Ρ€Π΅Π½Π½Π΅Π΅ устройство (sparse-set + recycle-stack):
///
/// β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
/// β”‚ sparse β”‚ id ──▢ β”‚ dense β”‚ dense idx ──▢ data[idx]
/// β”‚Uint32Listβ”‚ β”‚Uint32Listβ”‚
/// β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
@PlugFox
PlugFox / main.dart
Created March 24, 2026 08:55
Form State Management
/*
* Form State Management
* https://gist.github.com/PlugFox/eed8aaa9fe83a032f17139e8b1814986
* https://dartpad.dev/?id=eed8aaa9fe83a032f17139e8b1814986
*/
import 'package:flutter/material.dart';
void main() {
runApp(const App());
@PlugFox
PlugFox / .proxyauth
Created May 15, 2019 10:29
Установка ΠΈ настройка прокси-сСрвСра 3proxy Π½Π° Debian/Ubuntu
## addusers in this format:
#user:CL:password
##see for documentation: http://www.3proxy.ru/howtoe.asp#USERS
#
# Username
MyUser:CL:MyPassword
@PlugFox
PlugFox / main.dart
Last active March 17, 2026 12:30
Password validation
/*
* Password validation
* https://gist.github.com/PlugFox/b6aa1d256e6900424c74aa75136c9aef
* https://dartpad.dev?id=b6aa1d256e6900424c74aa75136c9aef
* Mike Matiunin <plugfox@gmail.com>, 17 March 2026
*/
// ignore_for_file: curly_braces_in_flow_control_structures
void main() {
@PlugFox
PlugFox / main.dart
Last active March 13, 2026 14:00
SliverLayout
/*
* SliverLayout
* https://gist.github.com/PlugFox/53636071587beeff1527f1ff48e5a969
* https://dartpad.dev?id=53636071587beeff1527f1ff48e5a969
* Mike Matiunin <plugfox@gmail.com>, 13 March 2026
*/
// ignore_for_file: library_private_types_in_public_api
import 'dart:math' as math;
@PlugFox
PlugFox / get_ios_rating.dart
Last active March 13, 2026 07:09
Collect AppStore rating
import 'dart:convert';
import 'dart:io' as io;
import 'package:http/http.dart' as http;
final $log = io.stdout.writeln; // Log to stdout
final $err = io.stderr.writeln; // Log to stderr
void main() => Future<void>(() async {
const appId = "6743122346"; // Doctorina app ID on the App Store, without the 'id' prefix