Skip to content

Instantly share code, notes, and snippets.

View htlin222's full-sized avatar
๐ŸฆŽ

Hsieh-Ting Lin (ๆž—ๅ”้œ†) htlin222

๐ŸฆŽ
View GitHub Profile
@htlin222
htlin222 / remove-microsoft-autoupdate.md
Last active December 23, 2025 11:02
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}
@htlin222
htlin222 / markdown.gs
Last active August 27, 2025 11:42
Google Docs Apps Script | Markdown-Style Heading & Bold Converter
/**
* Adds a menu to run the converter.
*/
function onOpen() {
DocumentApp.getUi()
.createMenu('Markdown')
.addItem('Convert #, **, and lists', 'convertMarkdownHeadingsAndBold')
.addToUi();
}
@htlin222
htlin222 / remove_microsoft_autoupdate.sh
Created August 1, 2025 04:27
Remove Microsoft AutoUpdate from macOS
#!/bin/bash
echo "Removing Microsoft AutoUpdate..."
# Kill any running Microsoft AutoUpdate processes
echo "Killing Microsoft AutoUpdate processes..."
# Find PIDs of Microsoft AutoUpdate processes
PIDS=$(ps aux | grep -i "Microsoft AutoUpdate" | grep -v grep | awk '{print $2}')
@htlin222
htlin222 / chatgptsay.sh
Created July 17, 2025 14:26
A Bash script that reads a JSON input containing a message field, sends the message to OpenAIโ€™s text-to-speech (TTS) API using a cheerful voice, and plays the resulting audio using afplay on macOS. Requires jq for JSON parsing and an OPENAI_API_KEY environment variable.
#!/bin/bash
# ่ฎ€ๅ– JSON ่ผธๅ…ฅ
json_input="$(cat)"
# ๆ“ทๅ– message ๆฌ„ไฝ๏ผˆ้œ€่ฆ jq๏ผ‰
message="$(echo "$json_input" | jq -r '.message')"
# ๅฆ‚ๆžœ jq ๆˆ–่จŠๆฏๆŠ“ไธๅˆฐ๏ผŒๅฐฑ้€€ๅ‡บ
if [[ -z "$message" || "$message" == "null" ]]; then
@htlin222
htlin222 / batch_claude.sh
Created July 2, 2025 04:35
ๅฆ‚ไฝ•ๆŠŠ claude code ็”จ็ˆ†
START=1
END=100
for i in $(seq -w $START $END); do
echo "Now processing note ${i}..."
claude -p --verbose "Now Process ${i}.md, YOUR_PROMPT_HERE"
osascript -e "display notification \"Finished ${i}\" with title \"Claude Processing\""
done
osascript -e "display notification \"All notes from ${START} to ${END} processed.\" with title \"Done\""
@htlin222
htlin222 / add-progressbar-in-google-slides.gs
Created May 14, 2025 14:48
Google Slides Custom Progress Bar Generator
function onOpen() {
const ui = SlidesApp.getUi();
ui.createMenu('่‡ชๅฎšๅŠŸ่ƒฝ')
.addItem('โณ Reload ProgressBars', 'updateProgressBars')
.addToUi();
}
function updateProgressBars() {
const presentation = SlidesApp.getActivePresentation();
const slides = presentation.getSlides();
(*
๐Ÿ“‹ Smart Paste for Finder
๐Ÿ‘จโ€๐Ÿ’ป Author: Hsieh-Ting Lin
๐Ÿ—“๏ธ Last Updated: 2025-05-01
๐Ÿ“ Description:
This AppleScript acts as a smart "Cmd + V" in macOS Finder.
Depending on clipboard content, it will:
๐Ÿ“ธ Paste images as PNG files in the active Finder folder
๐Ÿ“ Paste plain text as a .txt file