Skip to content

Instantly share code, notes, and snippets.

View AErmek's full-sized avatar

Ermek Akmatov AErmek

  • Bishkek
  • 00:28 (UTC +05:00)
  • LinkedIn in/aermek
View GitHub Profile
@PlugFox
PlugFox / main.dart
Last active January 27, 2023 10:45
Format input date
/*
* Format input date
* https://gist.github.com/PlugFox/9364d6a88d0baf1284e4cdc0581957e7
* https://dartpad.dev/9364d6a88d0baf1284e4cdc0581957e7
* Matiunin Mikhail <plugfox@gmail.com>, 27 January 2023
*/
void main() => [
'',
'.',
@PlugFox
PlugFox / database.dart
Last active March 18, 2024 11:32
Key Value extension for SQLite (Drift)
import 'package:database/src/platform/io.dart'
// ignore: uri_does_not_exist
if (dart.library.html) 'package:database/src/platform/js.dart';
import 'package:database/src/queries.dart';
import 'package:drift/drift.dart';
import 'package:meta/meta.dart';
part 'database.g.dart';
/// Key-value storage interface for SQLite database
@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

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@wojteklu
wojteklu / clean_code.md
Last active July 24, 2024 12:04
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules