Skip to content

Instantly share code, notes, and snippets.

View hermanho's full-sized avatar

Herman Ho hermanho

  • London
  • 06:43 (UTC +01:00)
View GitHub Profile
@hermanho
hermanho / ubuntu-lvm-root-migration.md
Created May 29, 2026 10:57
Ubuntu LVM Root Migration to a New Disk with More Inodes

Ubuntu LVM Root Migration to a New Disk with More Inodes

This guide migrates an Ubuntu system from an old disk to a new disk, recreating the root filesystem with a higher inode density using the tar streaming approach.

Goal

  • Move Ubuntu to another disk
  • Keep an LVM root layout
  • Increase inode count on /
  • Avoid creating a temporary tar archive file

Windows 11 25H2 upgrade lessons learned: drivers that broke update / boot

I finally got Windows 11 25H2 installed successfully after removing old low-level drivers, filter drivers, and leftover device-class hooks.

Symptoms

  • Repeated upgrade failure:
    • 0xC1900101
    • 0xC1900101 - 0x40017
  • SECOND_BOOT
@hermanho
hermanho / msi-z690-white-bios-screen-fix.md
Last active May 22, 2026 21:34
MSI PRO Z690-A DDR4 / BIOS 7D25v1N white BIOS screen fix

MSI PRO Z690-A DDR4 / BIOS 7D25v1N white BIOS screen fix

After updating to the latest AMI BIOS 7D25v1N (released for Secure Boot CA updates / security hardening), my PC could still boot into Windows, but I could no longer enter BIOS.

My hardware

  • Motherboard: MSI PRO Z690-A DDR4
  • CPU: Intel i7 KF
  • GPU: MSI GTX 970

Symptom

@hermanho
hermanho / generate_heic.sh
Last active August 15, 2025 23:32
Generate random images
#!/bin/bash
WIDTH=4032
HEIGHT=3024
MAX_JOBS=4
# Kill all child processes if user presses Ctrl+C
trap "echo '❌ Interrupted. Cleaning up...'; kill 0; exit 1" SIGINT
generate_image() {
@hermanho
hermanho / concurrent_task_progress_bar.ipynb
Created April 18, 2024 21:21 — forked from nikhilkumarsingh/concurrent_task_progress_bar.ipynb
Displaying Progress Bar for Concurrent Tasks
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hermanho
hermanho / uk_public_holidays.py
Created February 25, 2024 01:47 — forked from dogsbody/uk_public_holidays.py
UK public holidays in Python
from dateutil import rrule
from datetime import date, timedelta, datetime
def get_holidays(a=date.today(), b=date.today()+timedelta(days=365)):
rs = rrule.rruleset()
# Include all potential holidays
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth= 1, bymonthday= 1)) # New Years Day
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth= 1, bymonthday= 2, byweekday=rrule.MO)) # New Years Day
@hermanho
hermanho / App.js
Created December 25, 2022 03:44 — forked from mohitPassan/App.js
Custom hook to enable callback function for hooks
import { useStateWithCallback } from "./useStateWithCallback";
const App = () => {
const [bananas, setBananas] = useStateWithCallback(0);
const eatMore = () => {
setBananas(bananas + 1, (prevValue, newValue) => {
console.log(newValue);
});
};
import 'package:flutter/material.dart';
import 'dart:math' show pi;
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
@hermanho
hermanho / donate_crack.md
Created March 27, 2022 00:46 — forked from stu43005/donate_crack.md
[Cracked] Checker Plus for Gmail

破解 Checker Plus for Gmail 的 donate 功能限制

步驟

  1. 找到該 Extension 的 ID (通常從 Chrome WebStore 安裝的皆為oeopbcgkkoapgobdbedcemjljbihmemj)
  2. 訪問以下網址 chrome-extension://[ExtensionID]/donate.html?action=coinbaseSuccess
  • 帶入預設ID則為 chrome-extension://oeopbcgkkoapgobdbedcemjljbihmemj/contribute.html?action=coinbaseSuccess
  1. 破解完成~
@hermanho
hermanho / gist:a9dc09cf665f6b3a3c349676c73605d9
Created September 12, 2020 17:41
asus rt-ac86u region vs wireless channel
# https://www.snbforums.com/threads/asus-rt-ac86u-dual-band-ac2900-wireless-router-reviewed.42195/page-9#post-412345
Region/Channels 1-11 12-13 36-48 52-64 100-112 116 132-140 149-161 165
Asia............ x ...---... x ...---....---...---...---..... x ... x
China(Default).. x ... x ...---...---....---...---...---..... x ... x
Europe.......... x ... x ... x ... x .... x ... x ... x .....---...---
Korea........... x ... x ... x ...---....---...---...---..... x ...---
Russia.......... x ... x ... x ... x .... x ... x ... x .....---...---
Singapore....... x ...---... x ...---....---...---...---..... x ... x
United States... x ...---... x ...---....---...---...---..... x ... x