Skip to content

Instantly share code, notes, and snippets.

View halfa's full-sized avatar
💭
shepherding containers

Maximilien Richer halfa

💭
shepherding containers
View GitHub Profile
@ironicbadger
ironicbadger / alexs-results
Last active October 16, 2025 10:36
results
#######
## These results are still open to the public. See
## https://blog.ktz.me/the-best-media-server-cpu-in-the-world/
## for analysis of them.
# https://github.com/ironicbadger/quicksync_calc
# zoidberg - dell 7040 sff pc
CPU TEST FILE BITRATE TIME AVG_FPS AVG_SPEED AVG_WATTS
i5-6600T h264_1080p_cpu ribblehead_1080p_h264 18952 kb/s 116.352s 29.88 1.04x N/A
@mdeweerd
mdeweerd / .-README.md
Last active January 29, 2024 09:27
Migrate Home Assistant sqlite3 to mariadb/mysql

Note

⚠️ The useful file is migrate_db.sh

(GITHUB gists do not allow us to manage the order easily)

if [ -f ~/.vim/autoload/plug.vim ]; then
echo "fzf-vim already installed."
else
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
cat >> ~/.vimrc <<EOF
call plug#begin('~/.vim/plugged')
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
call plug#end()
command! -bang -nargs=* GGrep
@PatrickLang
PatrickLang / Fedora34-VM.ps1
Last active September 27, 2023 10:31
Hyper-V example setup for Fedora 34
# Echo the commands as they're run
Set-PSDebug -Trace 1
# Dump Windows version
Get-ComputerInfo | Format-Table WindowsVersion, OsVersion
# Create a UEFI VM, secure boot enabled, use the secure boot settings for the
$vm = New-VM -Generation 2 -Name "Fedora 34 beta" -Path .
$vm | Set-VMFirmware -EnableSecureBoot On -SecureBootTemplate "MicrosoftUEFICertificateAuthority"
@ityonemo
ityonemo / test.md
Last active October 23, 2025 01:27
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@katef
katef / plot.awk
Last active November 20, 2024 23:27
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
@vbatts
vbatts / flatcar.sh
Created June 24, 2020 21:27
run a local flatcar VM for testing
#!/bin/sh
set -eu
curl -LO https://www.flatcar-linux.org/security/image-signing-key/Flatcar_Image_Signing_Key.asc
gpg --import Flatcar_Image_Signing_Key.asc
wget \
https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_qemu_image.img.bz2 \
https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_qemu.sh \
https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_qemu.README \
  1. apt install bbswitch
  2. /etc/modprobe.d/bbswitch.conf
        options bbswitch load_state=0 unload_state=1
    To run bbswitch without bumblebeed on system startup, do not forget to add bbswitch to /etc/modules-load.d.
    nano /etc/modules-load.d
        bbswitch
@simonrenger
simonrenger / memoy_managment_cpp_resource_list.md
Last active October 29, 2025 11:29
C++ Memory Management Resource List
@kekru
kekru / 01nginx-tls-sni.md
Last active October 17, 2025 07:11
nginx TLS SNI routing, based on subdomain pattern

Nginx TLS SNI routing, based on subdomain pattern

Nginx can be configured to route to a backend, based on the server's domain name, which is included in the SSL/TLS handshake (Server Name Indication, SNI).
This works for http upstream servers, but also for other protocols, that can be secured with TLS.

prerequisites

  • at least nginx 1.15.9 to use variables in ssl_certificate and ssl_certificate_key.
  • check nginx -V for the following:
    ...
    TLS SNI support enabled