Skip to content

Instantly share code, notes, and snippets.

View sma's full-sized avatar

Stefan Matthias Aust sma

  • I.C.N.H GmbH
  • Kiel
View GitHub Profile
@sma
sma / 0README.md
Last active May 4, 2025 09:33
A tiny server UI framework for Flutter

A tiny server UI framework

Let's iteratively create the components to create Flutter UIs from textual descriptions. How to create those descriptions or how you get them from some server shall be out of scope.

A simple HTTP REST is probably sufficient, but especially for debugging, a parallel web socket channel or server side events (SSEs) would be useful to trigger a redisplay as if the app was hot-reloaded. For production, consider caching all responses.

Hierarchical nodes

Here's a generic hierarchical Node class which will be our main building block:

@sma
sma / ätherspannung.md
Last active April 12, 2025 09:01
Ein Rollenspiel von Optimus Alpha (April 2025), ein Prompt. Anhang ist zweiter Prompt.

(Mit diem selben Prompt habe ich "Optimus Alpha", ein "Stealth"-Model auf Openrouter ausprobiert, wo unbekannt ist, wer der Hersteller ist. Bei dem Namen würde ich auf X.AI tippen. Der Anhang stammt wieder aus einem eigenen Prompt.)


ÄTHERSPANNUNG

Abenteuer im elektrifizierten Berlin 1900


INHALT

@sma
sma / funken_und_schatten.md
Last active April 12, 2025 08:59
Ein Rollenspiel von Gemini 2.5 (März 2025), ein Prompt. Anhang ist zweiter Prompt.

Funken & Schatten

Ein Rollenspiel voller Erfindungen, Intrigen und Abenteuer im elektrifizierten Kaiserreich

Inhaltsverzeichnis:

  1. Einleitung: Willkommen bei Funken & Schatten
  2. Die Grundpfeiler des Spiels
  3. Charaktererschaffung
  • Attribute

Writing a Dice Roller MCP Server in Dart

Let's write a MCP server in Dart. I'd like to make a tool that knows how to roll dice. This way, an LLM can get access to a real source of randomnes.

There's no ready-to-use Dart package, but there's a specification that details how to create such a server.

In its easiest form, the server reads JSON RPC requests from stdin and writes responses to stdout. It is allowed to use stderr for logging. All streams are UTF-8 encoded and adhere to the JSONL format, that is, each request must be a single line.

RPC

@sma
sma / map-revealer.html
Created March 10, 2025 09:13
A local web app written by Claude.ai to partly reveal maps on a second browser tab
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TTRPG Map Revealer</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
@sma
sma / basic.dart
Created September 18, 2024 17:06
A Basic interpreter thrown together with ChatGPT
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(const BasicInterpreterApp());
class BasicInterpreterApp extends StatelessWidget {
const BasicInterpreterApp({super.key});
@override
Widget build(BuildContext context) {
@sma
sma / triangle_progress.dart
Created September 15, 2024 09:36
A triangle shaped progress indicator
import 'dart:math';
import 'package:flutter/material.dart';
class TriangleProgress extends StatelessWidget {
final double value;
const TriangleProgress({super.key, required this.value});
@override
Widget build(BuildContext context) {
import 'package:flutter/material.dart';
class RangeModel {
RangeModel(this.position, this.width);
final Offset position;
final double width;
}
class RangeView extends StatelessWidget {
import 'package:flutter/material.dart';
void main() {
runApp(App());
}
class App extends StatelessWidget {
const App({super.key});
@override
@sma
sma / review.md
Last active July 1, 2024 13:50
ChatGPT hat mir ein Review zum neuen Conan-Rollenspiel geschrieben

[Ich habe ChatGPT 4o das PDF vorgeworfen und gesagt, bitte mache mir ein ausführliches Review, zähle gute und nicht so gute Punkte auf und ziehe ein Fazit. Dies ist das leicht eingekürzte Ergebnis --sma]

Review of "Conan: The Hyborian Age" RPG Quickstart

Aussehen und Aufbau

Der "Conan: The Hyborian Age" RPG Quickstart besticht durch beeindruckende Illustrationen und ein klares Layout. Die Kunstwerke fangen die düstere, actionreiche Atmosphäre der Conan-Geschichten perfekt ein. Das Dokument ist logisch strukturiert und einfach zu navigieren, was den Einstieg erleichtert.

Charakterdefinition

Charaktere werden durch vier Hauptattribute definiert: Might, Edge, Grit und Wits. Diese reichen von 1 bis 8 und sind mit spezifischen Würfeln (D6, D8, D10) verbunden. Weitere Werte wie Physical Defense, Sorcery Defense, Life Points und Stamina Points sowie Skills und Ausrüstung bieten individuelle Anpassungsmöglichkeiten.