Skip to content

Instantly share code, notes, and snippets.

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

Plague Fox PlugFox

🦊
🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊🦊
View GitHub Profile
@PlugFox
PlugFox / main.dart
Last active September 18, 2023 16:56 — forked from kitsuniru/main.dart
'closure_1 as closure_2' problem
import 'dart:isolate';
void main() async {
final toMainIsolate = ReceivePort();
final stream = toMainIsolate;
void fn(ITargetAction action) => action.handleAction();
final worker = Worker<ITargetAction>(
port: toMainIsolate.sendPort,
@PlugFox
PlugFox / mem_usage.dart
Last active December 21, 2023 11:02 — forked from devxpy/mem_usage.dart
dart print out memory usage
import 'dart:developer' as developer;
import 'package:intl/intl.dart';
// https://pub.dev/packages/vm_service
import 'package:vm_service/vm_service.dart' show MemoryUsage, VM, VmService;
import 'package:vm_service/vm_service_io.dart' show vmServiceConnectUri;
Future<void> printHeapUsage() async {
@PlugFox
PlugFox / tokens.md
Created October 4, 2022 19:30 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@PlugFox
PlugFox / page_turn.dart
Created April 17, 2022 17:19 — forked from slightfoot/page_turn.dart
Page Turn Effect - By Simon Lightfoot. Replicating this behaviour. https://www.youtube.com/watch?v=JqvtZwIJMLo
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// 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:
@PlugFox
PlugFox / main.dart
Created April 17, 2022 17:17 — forked from collinjackson/main.dart
PageView example with dots indicator
// 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());
}
@PlugFox
PlugFox / main.dart
Created February 7, 2022 11:20 — forked from purplenoodlesoop/main.dart
Google translated localizations generator
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:pure/pure.dart';
import 'package:translator/translator.dart';
const languages = [
"ru",
"pt",
@PlugFox
PlugFox / hot_reload.dart
Created November 13, 2021 13:02 — forked from xvrh/hot_reload.dart
Shelf hot reload
import 'dart:io';
import 'dart:developer' as dev;
import 'package:shelf/shelf_io.dart' as io;
import 'package:shelf/shelf.dart' as shelf;
import 'package:vm_service/utils.dart';
import 'package:vm_service/vm_service.dart';
import 'package:vm_service/vm_service_io.dart';
import 'package:watcher/watcher.dart';
import 'package:stream_transform/stream_transform.dart';
@PlugFox
PlugFox / comments.json
Created October 27, 2021 20:47
VSCode Dart/Flutter snippets.
{
"New dartdoc template": {
"prefix": "newtmpl",
"body": [
"/// {@template $TM_FILENAME_BASE.$1}",
"/// $0",
"/// {@endtemplate}"
],
"description": "Creates a new dartdoc template with current file's name as its prefix"
},
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/
@PlugFox
PlugFox / emulator-install-using-avdmanager.md
Created October 20, 2020 15:40 — forked from mrk-han/emulator-install-using-avdmanager.md
Installing and creating Emulators with AVDMANAGER (For Continuous Integration Server or Local Use)

Install and Create Emulators using AVDMANAGER and SDKMANAGER

TL;DR

For generic skin emulator with default apis (without google apis):

  1. List All System Images Available for Download: sdkmanager --list | grep system-images

  2. Download Image: sdkmanager --install "system-images;android-29;default;x86"