Skip to content

Instantly share code, notes, and snippets.

View htlin222's full-sized avatar
🦎

Hsieh-Ting Lin (林協霆) htlin222

🦎
View GitHub Profile
@htlin222
htlin222 / grid.py
Last active February 23, 2026 18:25
Generate a grid overlay image for Google Slides (720x405) for designers — 6x6 big grid, 16x8 small cells, 7px unit, with position labels and dashed guides
from PIL import Image, ImageDraw, ImageFont
# Scale factor
scale = 5
# Parameters (original units)
big_cols, big_rows = 6, 6
small_w, small_h = 16, 8
cell_px = 7 * scale
#!/bin/bash
# Remove Microsoft AutoUpdate from macOS
# Usage: curl -fsSL https://gist.githubusercontent.com/htlin222/RAW_URL | bash
set -euo pipefail
echo "🧹 Removing Microsoft AutoUpdate from macOS..."
# Step 1: Kill running processes
echo "[1/6] Killing running processes..."
pkill -9 -f "Microsoft AutoUpdate" 2>/dev/null || true
@htlin222
htlin222 / sustainable-project-templates.md
Created February 6, 2026 06:30
穿著裝備去冒險:演進式專案模板的 Git 實踐 - 為什麼你的專案模板總是用一次就丟?

為什麼你的專案模板總是用一次就丟?

穿著裝備去冒險:演進式專案模板的 Git 實踐


引言:模板的困境

你是否有過這樣的經驗?

@htlin222
htlin222 / tmux_claude_switcher.sh
Last active February 7, 2026 12:55
tmux Claude session switcher - fzf-powered fuzzy finder to switch between active Claude panes or resume inactive sessions
#!/bin/zsh -f
# Suppress all stderr during cache building
exec 2>/dev/null
# title: "tmux_claude_switcher"
# version: 3.6.1 - sort inactive by recency (newest first)
# description: Claude pane switcher - active panes fresh, inactive sessions cached
#
# ============================================================================
# TMUX SETUP TUTORIAL
# ============================================================================
@htlin222
htlin222 / statusline-command.sh
Last active January 13, 2026 11:14
Claude Code custom statusline with real-time usage metrics, git status, and dad jokes
#!/bin/bash
#
# Claude Code Statusline Script
# A custom statusline for Claude Code CLI with real-time usage metrics
#
# ============================================================================
# INSTALLATION
# ============================================================================
#
# 1. Download this script:
@htlin222
htlin222 / remove-microsoft-autoupdate.md
Last active January 14, 2026 12:09
Remove Microsoft AutoUpdate from macOS - Complete Guide

Remove Microsoft AutoUpdate from macOS

A complete guide to kill, remove, and prevent Microsoft AutoUpdate from running on macOS.

Step 1: Kill Running Processes

pkill -9 -f "Microsoft AutoUpdate"
pkill -9 -f "Microsoft AU"
{"name":"lizard.quarto.basic","settings":"{\"settings\":\"{\\n \\\"files.associations\\\": {\\n \\\"renv.lock\\\": \\\"json\\\"\\n },\\n \\\"workbench.preferredHighContrastColorTheme\\\": \\\"Catppuccin Latte\\\",\\n \\\"positron.assistant.enable\\\": true,\\n \\\"positron.assistant.alwaysEnableApplyInEditorAction\\\": true,\\n \\\"positron.assistant.followups.enable\\\": true,\\n \\\"claudeCode.preferredLocation\\\": \\\"panel\\\",\\n \\\"window.newWindowProfile\\\": \\\"Default\\\"\\n}\"}","extensions":"[{\"identifier\":{\"id\":\"anthropic.claude-code\",\"uuid\":\"3c13ae49-babe-45fe-8c48-5e45077a62bf\"},\"displayName\":\"Claude Code for VS Code\",\"applicationScoped\":false},{\"identifier\":{\"id\":\"catppuccin.catppuccin-vsc\",\"uuid\":\"69264e4d-cd3b-468a-8f2b-e69673c7d864\"},\"displayName\":\"Catppuccin for VSCode\",\"applicationScoped\":false},{\"identifier\":{\"id\":\"catppuccin.catppuccin-vsc-icons\",\"uuid\":\"625b9abd-dfac-405b-bf34-e65f46e2f22f\"},\"displayName\":\"Ca
@htlin222
htlin222 / supplements_not_help.bib
Created October 2, 2025 07:04
20個「大型RCT顯示無顯著效益或有害」的經典案例文獻引用(AMA格式)
@article{Clegg2006,
author = {Clegg, D. O. and Reda, D. J. and Harris, C. L. and others},
title = {Glucosamine, chondroitin sulfate, and the two in combination for painful knee osteoarthritis},
journal = {New England Journal of Medicine},
year = {2006},
volume = {354},
number = {8},
pages = {795--808},
doi = {10.1056/NEJMoa052771},
note = {葡萄糖胺/軟骨素(膝關節炎):整體族群無減痛效益,僅中重度疼痛亞組顯示可能有效。}
@htlin222
htlin222 / organize.sh
Created September 21, 2025 03:15
A Bash script that organizes files in the ~/Downloads folder by file age and file type.
#!/bin/bash
# Downloads Organizer Script
# Organizes files by age (3d, 7d, 14d, 30d, old) and then by file type
set -e
# Configuration
DOWNLOADS_DIR="/Users/htlin/Downloads"
DRY_RUN=${DRY_RUN:-false}