Skip to content

Instantly share code, notes, and snippets.

@Crypto-Shroom
Crypto-Shroom / xiaomi-home-assistant-integrations.md
Last active February 4, 2026 15:06
Miio vs Xiaomi Home vs Miot Auto – Which should I chose?

📌 Clarifying the Xiaomi Miio / now known as Xiaomi Home situation in Home Assistant

Important naming clarification up front (this causes a lot of confusion):

The legacy Xiaomi Miio integration in Home Assistant core is now shown in the UI as “Xiaomi Home” (green icon). This is not the same thing as the new official Xiaomi OAuth-based Xiaomi Home integration. In this post, when I say “Miio (now known as Xiaomi Home)”, I mean the legacy token-based integration, not the new OAuth one. This naming overlap is a big part of why this topic is so confusing.

TL;DR

@timothyham
timothyham / ipv6guide.md
Last active February 13, 2026 19:12
A Short IPv6 Guide for Home IPv4 Admins

A Short IPv6 Guide for Home IPv4 Admins

This guide is for homelab admins who understand IPv4s well but find setting up IPv6 hard or annoying because things work differently. In some ways, managing an IPv6 network can be simpler than IPv4, one just needs to learn some new concepts and discard some old ones.

Let’s begin.

First of all, there are some concepts that one must unlearn from ipv4:

Concept 1

@fbouchery
fbouchery / extract.php
Last active March 14, 2024 09:49
Extract phpstan baseline history count from GIT
<?php
$baselineFile = 'phpstan-baseline.neon';
$branch = 'origin/main';
echo "date;count\n";
foreach (explode("\n", `git log {$branch} --pretty="format:%H;%cI" --date-order --reverse {$baselineFile}`) as $line) {
[$hash, $date] = explode(';', $line);
preg_match_all('`^\s+count:\s+(\d+)`m', `git show $hash:{$baselineFile}`, $matches);
echo $date, ';', array_sum(array_map('intval', $matches[1])), "\n";
}
@1player
1player / bazarr.docker-compose.yml
Last active January 2, 2026 13:10
Poor man's media centre
# Bazarr downloads subtitles
version: "3.4"
services:
bazarr:
image: linuxserver/bazarr:1.0.5-development
container_name: bazarr
restart: unless-stopped
environment:
- TZ=Europe/London
@prologic
prologic / LearnGoIn5mins.md
Last active January 13, 2026 22:47
Learn Go in ~5mins
@barryosull
barryosull / index.php
Created February 28, 2020 10:32
PHPUnit Code Coverage Report of Web App
<?php
/**
How to run a code coverage report on a web page:
Simply put this code after the vendor require and before the rest of the calling logic.
(Assumes you have PHPUnit installed)
**/
require_once __DIR__ . "/../vendor/autoload.php";
# File: /etc/apt/apt.conf.d/docker-autoremove-suggests
# Since Docker users are looking for the smallest possible final images, the
# following emerges as a very common pattern:
# RUN apt-get update \
# && apt-get install -y <packages> \
# && <do some compilation work> \
# && apt-get purge -y --auto-remove <packages>
# By default, APT will actually _keep_ packages installed via Recommends or
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active February 9, 2026 12:22
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@wurin7i
wurin7i / damm_check_digit.php
Last active March 1, 2020 15:44
Damm validation & generation code in PHP.Damm algorithm is a check digit algorithm that detects all single-digit errors and all adjacent transposition errors.
<?php
/**
* The Damm check digit
* For more information cf. http://en.wikipedia.org/wiki/Damm_algorithm
* totally anti-symmetric quasigroup
*
* @author Wuri Nugrahadi <w.nugrahadi@gmail.com>
*/
if (! function_exists('taq'))
{