Skip to content

Instantly share code, notes, and snippets.

View mikaelhg's full-sized avatar
🏠
Working from home

Mikael Gueck mikaelhg

🏠
Working from home
View GitHub Profile

So a new 802.11ax Mediatek mt7621u USB Wifi device initially didn't work.

It required blacklisting the btusb kernel module to get it to work as a Wifi device.

@mikaelhg
mikaelhg / hq-whisper-ctranslate2.sh
Created August 3, 2024 14:58
High quality settings for whisper-ctranslate2
whisper-ctranslate2 --language en --model large-v3 \
--output_dir /tmp/transcript --output_format all \
--device cuda --compute_type float16 \
--beam_size 10 --patience 2 --vad_filter True \
--word_timestamps True --hallucination_silence_threshold 0.1 \
transcript.wav
@mikaelhg
mikaelhg / 01_README.md
Created August 1, 2024 05:07
XFCE4 disappearing Super keys

~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml

xfsettingsd --replace

... or if you want to run it in foreground in terminal XFSETTINGSD_DEBUG=1 xfsettingsd --replace --no-daemon

@mikaelhg
mikaelhg / urllib3.md
Created March 7, 2024 20:31
OpenSearch lib resource consumption testing
@mikaelhg
mikaelhg / SystemProperties.kt
Last active July 13, 2023 20:38
Kotlin utility class for easily fetching standard system props
package io.mikael
import java.time.LocalDate
object SystemProperties {
operator fun get(key: String): String? = System.getProperty(key)
fun get(key: String, default: String): String = get(key) ?: default
@mikaelhg
mikaelhg / zstd_compress.py
Created June 29, 2023 13:46
Setting zstd compression level to 22 with pandas and parquet
import pandas as pd
df = ...
df.to_parquet("foobar.parquet.zst", compression='zstd', compression_level=22)
internal inline fun <reified T : Any> T.getClassLogger() : java.util.logging.Logger
= java.util.logging.Logger.getLogger(T::class.java.name)
@mikaelhg
mikaelhg / runrandr.sh
Created February 2, 2023 12:33
Use xrandr to reset screens
xrandr --output eDP --auto
xrandr --output HDMI-A-0 --auto
#!/bin/bash
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export QT_SCREEN_SCALE_FACTORS=2
/usr/bin/synclient TapButton3=2 &
@mikaelhg
mikaelhg / 01_README.md
Last active November 14, 2022 12:19
Hetzner + Caddy + GoToSocial

Zero to self-hosted Fediverse presence

With Hetzner + Caddy + GoToSocial.

1. You probably already have some way to host content on the Internets, but if not, get a $5 Hetzner cloud server. I just put it on my home server, a old repurposed thin client.

2. Install Caddy.