Skip to content

Instantly share code, notes, and snippets.

@SilverMira
SilverMira / README.md
Created March 24, 2023 14:40
Flutter Windows CLI/GUI hybrid app

Flutter Windows CLI/GUI hybrid app

As outlined in this issue, print methods from Dart do not reflect on terminals on Windows.

To create a Flutter app that acts like a normal GUI app when launched from explorer on windows, but can provide CLI capabilities, there's a need to redirect STD streams using AttachConsole() and freopen_s()

However, there is also a catch. _isatty() is essential in not breaking flutter run

@SilverMira
SilverMira / custom.omp.json
Created January 29, 2023 17:04
Custom oh-my-posh theme (SilverMira)
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#BBC4B9",
"leading_diamond": "<#BFA8BF>~</> ",
@SilverMira
SilverMira / README.MD
Last active May 27, 2022 02:11
Vite manifest to include CSS entrypoints

Related issue

How

Turns out, Vite's built in manifest plugin IS able to generate CSS entrypoints in manifest.json. In fact, I accidentally discovered this when trying to adapt the internal plugin with minimal changes.