Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/widgets.dart';
/// Converts a string that contains ANSI/ASCII escape codes (SGR sequences)
/// into a [TextSpan]. Only the most frequently‑used codes are handled
/// (colors, bold, italic, underline, reset). Unknown codes are ignored.
///
/// Example:
/// ```dart
/// RichText(
/// text: ansiToTextSpan('\x1B[31mHello \x1B[1;34mWorld\x1B[0m!'),
- name: Set up Xcode version
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.2'
@jezell
jezell / action.yaml
Last active March 26, 2025 09:16
Build Flutter Engine
# .github/actions/build-engine/action.yml
name: ""
description: "Build the engine with a specific gclient setup and config name"
inputs:
gclient:
description: "gclient name"
required: false
default: ""
config_name:
description: "name of a valid et config"
@jezell
jezell / error.txt
Created March 21, 2025 01:11
openai error
INFO:room_server:llm.output: {'context': 'd78a95ab-1e6c-4d6d-bc5a-2740f480703f', 'participant_id': '06eea232-f000-4daa-9066-1e7d3767bb17', 'participant_name': 'coder', 'response': {'item': {'id': 'msg_67dcbc10a9248191809772c5d9862c020450ddcac89f65d4', 'content': [{'annotations': [], 'text': "Sure! I'll add four more pages to your website. I'll include links to these pages from the main page and provide basic content for each one.\n\nThe pages will include:\n\n1. **About**\n2. **Projects**\n3. **Blog**\n4. **Contact**\n\nI'll create the files now.", 'type': 'output_text'}], 'role': 'assistant', 'status': 'completed', 'type': 'message'}, 'output_index': 0, 'type': 'response.output_item.done'}}
INFO:websocket-server:SSE chunk received: event: response.function_call_arguments.delta
data: {"type":"response.function_call_arguments.delta","item_id":"fc_67dcbc116b9c8191a8e703b496f5bdc30450ddcac89f65d4","output_index":1,"delta":"\","}
event: response.function_call_arguments.delta
data: {"type":"response.function_cal
@jezell
jezell / bug.py
Created March 16, 2025 01:56
openai_parallel_tool_call_id_bug.md
from openai import AsyncOpenAI
import os
import asyncio
openai=AsyncOpenAI(
api_key=os.getenv("OPENAI_API_KEY")
)
async def run():

That sounds like an ambitious and exciting project! I'll research how to upgrade the SkWasm renderer to use Skia Graphite and adapt it to run natively on iOS. This will involve understanding the SkWasm renderer, Skia Graphite integration, and modifying the Flutter engine for iOS compatibility. I'll get back to you with a detailed breakdown and potential implementation steps.

Upgrading Flutter’s SkWasm Renderer to Skia Graphite (with iOS Native Integration)

Introduction

Flutter’s SkWasm renderer is a new WebAssembly-based rendering backend that uses Skia for Flutter Web apps. It aims to reduce download size and enable multi-threaded rendering on the web (Web renderers | Flutter). Meanwhile, Skia Graphite is an upcoming Skia rendering architecture designed for modern graphics APIs (Metal, Vulkan, WebGPU) to replace Skia’s traditional GPU backend (Ganesh) ([Switch from Ganesh to G

@app.cls(concurrency_limit=1, allow_concurrent_inputs=1)
class RoomProvisioner:
project_id: str = modal.parameter()
room_name: str = modal.parameter()
sandbox = None
@modal.web_endpoint()
def lookup(self):
@jezell
jezell / flutter matrix build.yaml
Last active February 22, 2025 00:27
matrix build
name: Build Flutter Engine with Engine Tool (Matrix)
on:
push:
branches: [ "main", "engine-builds" ]
pull_request:
branches: [ "main", "engine-builds" ]
env:
# don't try to install google's internal copy of visual studio
DEPOT_TOOLS_WIN_TOOLCHAIN: 0

Overview

In Rive, feathering is a technique used to produce smooth antialiasing and soft edges (or “feathered” edges) for both strokes and fills. Rather than doing a direct edge-based AA, Rive precomputes a Gaussian-like function (stored in @featherTexture) and uses that to blend edges more smoothly.

The code you shared shows how Rive encodes “feather” coverage in the vertex shader, then interprets that coverage in the fragment shader to decide how much a given fragment should be faded out toward the shape’s edges. Below is a step-by-step explanation of how it all comes together.


1. Coverage Encoding and Classification

name: Build Flutter Engine with Engine Tool
on:
# Run on push or pull requests, modify to your needs.
push:
branches: [ "main", "engine-builds" ]
pull_request:
branches: [ "main", "engine-builds" ]
jobs: