Skip to content

Instantly share code, notes, and snippets.

View bttger's full-sized avatar
🦄

Tom Boettger bttger

🦄
View GitHub Profile
@bttger
bttger / authenticate.ts
Created September 29, 2021 19:39
find the error...
/**
* Checks if the provided credentials are correct and returns corresponding
* employer entity
*
* @throws 404 NotFound Exception (email not found)
* @throws 401 Unauthorized Exception (email and password combination wrong)
* @param email
* @param password
*/
async validateCredentialsEmployer(
@bttger
bttger / openra.md
Last active January 5, 2023 16:17
My hotkeys and tips for OpenRA

OpenRA hotkeys

  • , cycle status bars
  • Z to jump to selection
  • H to jump to base
  • Space to jump to last radar event
  • Q to select all combat units on screen (double click for on map)
  • Click on unit and W to select all units of same type on screen (double click for on map)
  • Shift + Click on unit to add it to selection (also possible to drag over multiple units)
@bttger
bttger / index.ts
Created May 10, 2023 20:57
Generate JSON on the upstream database to prevent n+1 query issues
type TableName = string;
type ColumnReference = string;
type SqlConditions = string;
type JsonKeyName = string;
type OrderBy = Record<ColumnReference, "ASC" | "DESC">;
enum QueryNodeType {
Array,
Object,
}
@bttger
bttger / connmon.go
Created June 22, 2023 15:26
Monitor your internet connection in a reliable interval
package main
import (
"bufio"
"flag"
"fmt"
"log"
"net/http"
"os"
"strings"
@bttger
bttger / extract_reddit_comments.py
Created July 28, 2024 00:25
Extract comments on Reddit posts
from lxml import etree
def process_elements(element, keep_tags, depth=0):
result = []
for child in element:
if child.tag in keep_tags:
result.append((depth, child))
result.extend(process_elements(child, keep_tags, depth + 1))
return result
@bttger
bttger / protocol.md
Created July 28, 2025 10:42
Lactate and vo2max testing protocol

Here’s a research-based, practical protocol for combined lactate/VO₂max testing for road cyclists, designed for accuracy, athlete safety, and efficiency. It aligns with current sports science consensus (e.g., studies by Faude, Kindermann, Skovereng, & Bourdon).

Key Principles

  1. Start Low: Avoids premature fatigue and captures LT1 (aerobic threshold).
  2. Progressive Steps: Enables clear lactate curve profiling.
  3. Optimal Stage Duration: 4 minutes balances metabolic stabilization (~95% VO₂ steady-state by 3 min) with test duration.
  4. Targeted Increments: Uses % of predicted FTP (pFTP) for accessibility.
  5. Termination Criteria: Ensures valid VO₂max and safety.
  6. Integrated Analysis: Combines lactate, gas exchange, and HR data.