Skip to content

Instantly share code, notes, and snippets.

@karolzlot
karolzlot / README.md
Created September 28, 2026 13:54
Codex 0.157.1: external credential changes abort an active response stream

Codex 0.157.1 active-turn credential-change reproduction

Standalone reproduction using the official Windows x64 Codex app-server, synthetic external-auth JWTs, and a local HTTPS/SSE or WSS Responses stub. No real account credentials or model responses are needed. Each case has a separate home, configuration and SQLite directory. The temporary CA is trusted only by the spawned process, not installed in the system store.

The provider accepts a request as A, sends response.created, and holds the response open. The client then applies B with account/login/start. The active turn fails with Fatal error: application network permission was revoked before the provider releases its response. The next turn completes under B. The script checks actual provider credentials as well as RPC notifications.

Setup

Save all five gist files into a new test directory. Run these commands there in PowerShell with Node.js, npm, aria2c, tar and Git for Windows installed. The OpenSSL commands generate test-only keys local

@karolzlot
karolzlot / normalization_comparison.py
Created December 1, 2022 01:10
Python normalization comparison
import unicodedata
from unidecode import unidecode
def normalize(text:str):
text = unicodedata.normalize('NFD', text)\
.encode('ascii', 'ignore')\
.decode("utf-8")
return text
text ='zażółć gęślą jaźń, kožušček 北亰 François aaßaa aßb'
@karolzlot
karolzlot / ovh_dns_settings_for_fastmail.txt
Last active May 12, 2026 14:07
OVH DNS settings for fastmail.com. They can be pasted "as text" in OVH panel to replace all current settings. You need to replace "example.fr" with your domain.
$TTL 3600
@ IN SOA dns200.anycast.me. tech.ovh.net. (2022082311 86400 3600 3600000 60)
IN NS ns200.anycast.me.
IN NS dns200.anycast.me.
IN A 66.111.4.53
IN A 66.111.4.54
IN MX 10 in1-smtp.messagingengine.com.
IN MX 20 in2-smtp.messagingengine.com.
IN TXT "v=spf1 include:spf.messagingengine.com ~all"
@karolzlot
karolzlot / logitech_k740_fn_remap.ahk
Last active April 11, 2022 05:43
How to remap Logitech k740 function keys with autohotkey
; This file is autohotkey v2 script.
#SingleInstance Force
#Warn ; Enable warnings to assist with detecting common errors.
SendMode "Input" ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory.
InstallKeybdHook ; how it works: https://lexikos.github.io/v2/docs/commands/InstallKeybdHook.htm
@karolzlot
karolzlot / discord_hide_to_try.ahk
Last active March 13, 2022 03:13
This script is written in AHK v2
#SingleInstance Force
#Warn ; Enable warnings to assist with detecting common errors.
SendMode "Input" ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory.
; This script hides Discord to tray.
if (not ProcessExist("Discord.exe"))
{
Run "C:\Users\user\AppData\Local\Discord\Update.exe --processStart Discord.exe --process-start-args --start-minimized"
@karolzlot
karolzlot / tqdm_cpu_ram.py
Last active March 24, 2025 07:13
Monitoring real time cpu and ram usage with tqdm. If you like it please upvote this answer: https://stackoverflow.com/a/69511430/8896457
from tqdm import tqdm
from time import sleep
import psutil
with tqdm(total=100, desc='cpu%', position=1) as cpubar, tqdm(total=100, desc='ram%', position=0) as rambar:
while True:
rambar.n=psutil.virtual_memory().percent
cpubar.n=psutil.cpu_percent()
rambar.refresh()
cpubar.refresh()
@karolzlot
karolzlot / tqdm2.py
Created October 9, 2021 01:03
tqdm multiline example 2
from tqdm import tqdm
from time import sleep
with tqdm(total=4, desc='1st loop', position=2) as pbar1:
with tqdm(total=5, desc='2nd loop', position=1) as pbar2:
with tqdm(total=50, desc='3rd loop', position=0) as pbar3:
for i in range(4):
pbar2.reset()
for j in range(5):
@karolzlot
karolzlot / tqdm1.py
Last active October 9, 2021 01:03
tdqm multiline example 1
from tqdm import tqdm
from time import sleep
with tqdm(total=4, desc='1st loop', position=2) as pbar1:
with tqdm(total=5, desc='2nd loop', position=1) as pbar2:
with tqdm(total=50, desc='3rd loop', position=0) as pbar3:
for i in range(4):
pbar2.reset()
for j in range(5):
@karolzlot
karolzlot / __main__.py
Created July 7, 2021 00:53
Pulumi + Python + Google Cloud Run -> version 1, with public access
import pulumi
import pulumi_gcp as gcp
region= "us-central1"
# Cloud Run Service is not enabled by default, let's enable it
enableCloudRun = gcp.projects.Service("EnableCloudRun",
service= "run.googleapis.com",
)
@karolzlot
karolzlot / __main__.py
Last active July 6, 2021 23:41
Pulumi + Python + Google Cloud Run -> version 1, without public access
import pulumi
import pulumi_gcp as gcp
region= "us-central1"
# Cloud Run Service is not enabled by default, let's enable it
enableCloudRun = gcp.projects.Service("EnableCloudRun",
service= "run.googleapis.com",