Skip to content

Instantly share code, notes, and snippets.

View vielhuber's full-sized avatar
🍐
❹❷

David Vielhuber vielhuber

🍐
❹❷
View GitHub Profile
@vielhuber
vielhuber / script.js
Created December 16, 2025 11:16
tts text to speech browser native #js
// list voices
speechSynthesis.getVoices().forEach(speech => { console.log(speech); });
// speak
let message = new SpeechSynthesisUtterance('Verteidigungsminister Boris Pistorius hat die Berliner Ukraine-Gespräche mit Europäern und den USA gelobt.');
message.lang = 'de-DE';
message.voice = speechSynthesis.getVoices().filter(voice => voice.name === 'Google Deutsch')[0];
window.speechSynthesis.speak(message);
// stop
@vielhuber
vielhuber / index.html
Last active December 16, 2025 11:33
stt speech-to-text native browser web speech api #js
<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, minimum-scale=1" />
<title>Web Speech API</title>
<script>
class STT {
static instances = [];
@vielhuber
vielhuber / about:config
Last active November 12, 2025 08:33
thunderbird automation #js
// Check all IMAP folders for new messages
mail.server.default.check_all_folders_for_new = true
// Automatic compaction without confirmation
mail.purge.ask = false
// Minimum delay between compactions (minutes)
mail.purge.min_delay = 1
// Check interval for compaction (minutes)
@vielhuber
vielhuber / 1_show.ps1
Last active September 29, 2025 14:57
change task priority in task scheduler #windows #powershell
Get-ScheduledTask -TaskPath '\' | ForEach-Object {
$xml = [xml](Export-ScheduledTask -TaskName $_.TaskName -TaskPath $_.TaskPath -ErrorAction SilentlyContinue)
$node = $xml.SelectSingleNode("/*[local-name()='Task']/*[local-name()='Settings']/*[local-name()='Priority']")
$p = 7
if ($node -and $node.InnerText) { $p = [int]$node.InnerText }
[pscustomobject]@{
Task = "$($_.TaskPath)$($_.TaskName)".TrimStart('\')
Priority = $p
}
} | Format-Table -Auto
@vielhuber
vielhuber / README.MD
Last active December 3, 2025 13:32
mcp #ai

SERVER

NOTES

  • local: use fastmcp directly
  • production: use fastmcp as a gateway and cloudflare for ssl/dns

NGROK

  • https://***.ngrok-free.dev/mcp
@vielhuber
vielhuber / README.MD
Last active September 18, 2025 12:40
claude code / gemini cli / chatgpt codex cli #ai

install

  • npm install -g @openai/codex
  • npm install -g @anthropic-ai/claude-code
  • npm install -g @google/gemini-cli

run

  • codex
  • claude
@vielhuber
vielhuber / script.sql
Created August 21, 2025 07:49
MySQL increase GROUP_CONCAT max length #sql
SET SESSION group_concat_max_len = 1000000;
@vielhuber
vielhuber / index.html
Last active August 1, 2025 09:30
speculation rules prerender preload all links #html
<script type="speculationrules">
{
"prerender": [
{
"where": { "href_matches": "/*" },
"eagerness": "eager"
}
]
}
</script>
@vielhuber
vielhuber / install.md
Last active September 21, 2025 14:53
cleanup keepass kdbx #python
sudo apt install python3-lxml
python -m venv venv
source venv/bin/activate
pip install pykeepass
python script.py /path/to/file.kdbx
@vielhuber
vielhuber / README.MD
Last active July 20, 2025 11:38
pipe operator |> #php

old syntax

$value = "hello world";

// short version
$result = function1(function2(function3($value)));

// long version
$result1 = function3($value);