Skip to content

Instantly share code, notes, and snippets.

View Maxr1998's full-sized avatar

Max Rumpf Maxr1998

View GitHub Profile
@omltcat
omltcat / caddy_labels.md
Last active January 26, 2026 05:26
Caddy with Docker Labels: Easy config for wildcard certs and Authelia

What is this?

One great feature of caddy-docker-proxy is that you can quickly define config rules with Docker Compose labels in each containers on the fly like Traefik, instead of at a centralized place. With this feature, we can define everything in compose files, and don't ever need to mess with a config file (Caddyfile or JSON).

Taking advantage of snippets, I created this docker-compose.yaml example so that you can quickly define routing rules and add authetication like Authelia with just 3 lines of labels below each docker container you use.

With this example, should not ever need to manually edit Caddyfile config.

When you add a new container, you just need to do this:

networks:
@ammuench
ammuench / 8BitDoUltimateWifi_Linux.MD
Last active January 7, 2026 08:24
8BitDo Ultimate 2.4GHz wifi working in linux
@hanzoh
hanzoh / battery_sim.sql
Last active March 3, 2025 20:46
Simulate home battery from Home Assistant data
drop table tmp_battery_sim;
create table tmp_battery_sim (start timestamp without time zone, energy_in_battery numeric, energy_not_consumed_from_grid numeric, savings_from_battery numeric);
do $$
declare
-- Variables
t record;
vn_battery numeric := 0.0;
vn_battery_prev numeric := 0.0;
vn_grid_savings numeric := 0.0;
@MartinEesmaa
MartinEesmaa / youtube_formats.md
Last active January 22, 2026 20:23 — forked from AgentOak/youtube_formats.md
Youtube Format IDs

Note: This is all almost full YouTube ID informations. Original owner goes to AgentOak, modified version by Martin Eesmaa.

See the credits and also special thanks in below.

Before this gist has been forked, AgentOak made original gist on November 13 2019 and it was last updated on May 5 2021.

From now on, this forked gist is maintained by Martin Eesmaa since 17 September 2022.

Last updated: 08 January 2026

@FreddieOliveira
FreddieOliveira / docker.md
Last active January 24, 2026 14:41
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android πŸ‹πŸ“±

Edit πŸŽ‰

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@Mic92
Mic92 / iwd_migration.py
Last active July 1, 2024 13:28
Convert networkmanager/wpa_supplicant WPA/WPA2 networks to iwd networks
import glob
import re
import sys
import os
import subprocess
import curses.ascii
import binascii
from typing import Tuple, Optional
def parse_network_manager(filename: str) -> Tuple[Optional[str], Optional[str]]:

Credit to @cketti for the original steps

If you are annoyed that "Sources for Android 28" are not yet available via SDK manager, this might be for you:

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build
@hoegaarden
hoegaarden / git-fixbase
Last active December 8, 2025 22:59
git rebase, but keep author, committer & dates
#!/usr/bin/env bash
set -eu
set -o pipefail
usage() {
local me="$( basename "$0" | sed 's/^git-//' )"
cat <<EOF
git $me [target]
@pvieito
pvieito / gist:ee6d2c8934a8f84b9aeb467585277b8a
Last active January 26, 2026 12:08
Consumer keys of official Twitter clients

Twitter API Keys

Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for Google TV

Consumer key: iAtYJ4HpUVfIUoNnif1DA

# you need jq installed
set GITHUB_USER <YOUR USER NAME>
complete -c git -n "string match -r '^git clone.*' (commandline) > /dev/null ; echo $status" -a '(curl -Ls https://api.github.com/users/$GITHUB_USER/repos|jq ".[]|.clone_url" -c|string replace -a "\"" "")'