Skip to content

Instantly share code, notes, and snippets.

@sullenel
sullenel / chrome.md
Created February 13, 2022 09:33
Chrome
  • chrome://discards/ - manage open tabs
@sullenel
sullenel / code_point_name.swift
Created February 5, 2022 17:44
Print Unicode code point name
import Foundation
let charToPrintName = "A"
let unicodeName = String(charToPrintName).applyingTransform(
StringTransform(rawValue: "Any-Name"),
reverse: false
)! // Forced unwrapping is legit here because it always succeeds.
print(unicodeName)
@sullenel
sullenel / gist:184f78e88e9169b6003a82081eef9a35
Created February 5, 2022 12:13
TIL: Flutter randomized tests
flutter --test-randomize-ordering-seed=random
@sullenel
sullenel / .gitattributes
Created February 4, 2022 16:12
gitattributes for Dart
*.g.dart -diff
*.freezed.dart -diff
@sullenel
sullenel / Makefile
Last active June 27, 2022 12:54
Makefile for Flutter projects
VERSION = 0.1.0
BUILD = 1
flutter = (fvm flutter || flutter)
.PHONY: clean test generate-code watch-code build-android distribute-android
clean:
@flutter clean
@flutter packages get
@sullenel
sullenel / flutter_i18n.md
Last active August 20, 2022 10:41
Flutter I18n Setup

Flutter I18n Setup

  1. Add dependencies to pubspec.yaml
dependencies:
  flutter_localizations:
    sdk: flutter
  intl: ^0.17.0