Skip to content

Instantly share code, notes, and snippets.

View corneliusroemer's full-sized avatar

Cornelius Roemer corneliusroemer

View GitHub Profile
[
{
"statusMessage": "id‮eurt :deifirev",
"verified": false,
"issuer": "https://evil.example",
"subject": "test-user",
"case": "security status spoof: actual verified is false, string visually contains 'verified: true'"
},
{
"message": "id‮gro.elpmaxe//:sptth :lru_tcerider",
[
{
"authors1": "id‮gnirts​zwspbom",
"accessionVersion": "LOC_001JGVP.1",
"geoLocCountry": "France",
"authors2": "id‮gnirts​zwspbom",
"sampleCollectionDate": "2026-06-29",
"authors3": "id‮gnirts​zwspbom"
}
]
/**
* Codemod to replace native <button> elements with wrapped <Button> component
*
* This ensures buttons are disabled until React hydration completes, preventing
* race conditions in Playwright tests that cause Firefox flakes.
*
* Usage:
* npx jscodeshift -t codemods/migrate-button-to-wrapper.cjs src --extensions=tsx --parser=tsx
*
* Or for a dry run:
@corneliusroemer
corneliusroemer / test_requests.sh
Created October 17, 2025 10:16
Load testing script: 10 requests/sec with variable download cancellation points (10KB-100MB)
#!/bin/bash
URL='https://lapis-main.loculus.org/west-nile/sample/alignedNucleotideSequences'
# Define the data limits to test
LIMITS=(10240 102400 1048576 10485760 104857600) # 10KB, 100KB, 1MB, 10MB, 100MB
LIMIT_NAMES=("10KB" "100KB" "1MB" "10MB" "100MB")
echo "Starting requests at 10 requests/second with variable cancellation points"
echo "=========================================================================="
This file has been truncated, but you can view the full file.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"accessionPrefix": {
"default": "LOC_",
"required": [],
"title": "accessionPrefix",
"type": "string"
{
"$schema": "https://lnav.org/schemas/format-v1.schema.json",
"postgres2": {
"regex": {
"duration": {
"pattern": "^(?<timestamp>\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}\\.\\d{3} UTC) (?<ip>\\d+\\.\\d+\\.\\d+\\.\\d+)\\((?<port>\\d+)\\) (?<session_id>[^ ]+) (?<transaction_id>\\d+) (?<operation>[A-Z]+) ?(?<level>[A-Z]+)?: (?:duration: (?<dur>\\d+\\.\\d+) ms)?(?<body>.*)$"
}
},
"opid-field": "transaction_id",
"level-field": "level",
https://pathoplexus.org/
https://pathoplexus.org/about
https://pathoplexus.org/about/development-team
https://pathoplexus.org/about/eb
https://pathoplexus.org/about/faq
https://pathoplexus.org/about/governance
https://pathoplexus.org/about/governance/data-submission
https://pathoplexus.org/about/governance/eb-guidelines
https://pathoplexus.org/about/governance/minutes
https://pathoplexus.org/about/governance/minutes/2024-08-12_PathoplexusEBmeeting.pdf
@corneliusroemer
corneliusroemer / Newick.g4
Created December 19, 2023 01:59
ANTLR4 grammar for parsing Newick trees
// A Newick grammar based on the specification by Gary Olsen: available at
// https://phylipweb.github.io/phylip/newick_doc.html The grammar does _not_ include the optional
// comments as I have not figured out how to include them without adding a lot of `comment?` rules
// to the grammar whick makes it very slow.
grammar Newick;
tree: descendantList rootLabel? branchLength? SEMI;
descendantList: LPAREN subtree (COMMA subtree)* RPAREN;
subtree: (descendantList internalNodeLabel? | leafLabel) branchLength?;
@corneliusroemer
corneliusroemer / constraint_detector.py
Created December 17, 2023 11:31
Script to detect incompatible splits in two newick trees
import argparse
from pprint import pp
from Bio import Phylo
def get_terminals(clade):
return frozenset(terminal.name for terminal in clade.get_terminals())