Skip to content

Instantly share code, notes, and snippets.

@katagaki
katagaki / emudhra-distrust.sh
Created October 24, 2026 23:57
Block compromised eMudhra intermediates.
#!/bin/bash
# Block the compromised eMudhra intermediates (Apple HT 149555) for curl/git by removing the two
# roots in /etc/ssl/cert.pem that anchor them, matched by SPKI SHA-256.
#
# emudhra-distrust.sh [test] build a filtered copy in a temp dir and test it (no sudo, changes nothing)
# emudhra-distrust.sh apply back up, install, re-test live, auto-rollback on failure
# emudhra-distrust.sh rollback restore /etc/ssl/cert.pem.orig
# emudhra-distrust.sh check test the live file only
#
# TLS verification is never disabled; "rejected" below means curl/git failed verification.
@katagaki
katagaki / RemoveBigmeB6BloatSafe.sh
Last active October 11, 2026 04:26
Debloat Bigme B6 safely retaining key system features like multitasking.
#!/bin/zsh
packages=(
com.b300.xrz.web
com.ebook.imagemanager
com.ebook.wifitransferbook
com.example.test # Calendar app
com.iflytek.speechcloud
com.test.logcollect
com.xrz.ai
@katagaki
katagaki / fixContinuityMac.sh
Created September 22, 2026 01:52
Fix Continuity randomly turning off on macOS.
defaults write com.apple.coreservices.useractivityd ClipboardSharingEnabled -bool true
killall useractivityd
@katagaki
katagaki / Remove-MicrosoftEdge.ps1
Created August 7, 2026 03:13
Force remove Microsoft Edge from Windows 11.
#Requires -RunAsAdministrator
# Removes Microsoft Edge. Keeps WebView2. Breaks Edge-dependent servicing.
$ErrorActionPreference = 'SilentlyContinue'
# 1. Stop processes, disable services and tasks
Get-Process msedge,msedgewebview2,MicrosoftEdgeUpdate | Stop-Process -Force
foreach ($s in 'edgeupdate','edgeupdatem','MicrosoftEdgeElevationService') {
Stop-Service $s -Force
Set-Service $s -StartupType Disabled
@katagaki
katagaki / Cleanup-Windows11.ps1
Last active August 2, 2026 16:36
Simple script to clean up a fresh UTM Windows 11 install.
#Requires -RunAsAdministrator
<#
.SYNOPSIS
Windows 11 cleanup: telemetry, bundled apps, Copilot/OneDrive/Edge/Bing/new Outlook,
Spotlight off, dark theme on.
.DESCRIPTION
Uses an explicit allowlist for Appx removal. It will not touch SystemApps, shell
components, or framework packages, so explorer.exe survives.
@katagaki
katagaki / blue-archive-birthdays.ics
Created July 24, 2026 10:43
Blue Archive student birthdays in iCal calendar format.
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Blue Archive JP//Student Birthdays//JA
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:ブルーアーカイブ 生徒の誕生日
X-WR-TIMEZONE:Asia/Tokyo
X-WR-CALDESC:ブルーアーカイブ(日本版)実装済み生徒の誕生日
BEGIN:VEVENT
UID:84f2fde9f6e02255@bluearchive.local
@katagaki
katagaki / config.ghostty
Created June 25, 2026 03:36
Ghostty configuration.
background = #1f1f24
background-blur = macos-glass-regular
background-opacity = 0.7
cursor-color = #ffffff
cursor-style = underline
cursor-text = #1f1f24
font-family = SF Mono Terminal
font-size = 11
@katagaki
katagaki / setupAppleContainer.sh
Created June 16, 2026 01:45
Set up Apple `container` with Docker Engine on macOS 27
brew install container
brew tap socktainer/tap
brew install socktainer-next
brew install docker
container system start
container system kernel set --recommended
brew services start socktainer
docker context use socktainer
@katagaki
katagaki / setupiOSSimulator.sh
Last active May 31, 2026 13:05
Set up iOS Simulator for screenshots (9:41, 5G, 100% battery)
# Set time
xcrun simctl status_bar "iPhone" override --time "9:41"
# Set network to 5G
xcrun simctl status_bar "iPhone" override --dataNetwork 5g --cellularMode active --cellularBars 4
# Set network to Wi-Fi
xcrun simctl status_bar "iPhone" override --dataNetwork wifi --wifiMode active --wifiBars 3
# Set battery level
@katagaki
katagaki / claude-design.css
Created April 21, 2026 03:10
Some strange CSS Claude adds to designs.
.ad_content_mask, .ad-slot-234-60, .publisher_ad, .banner-ad-inner, .divider-taboola, .ad-transition, #cookie_consent_container, #Adv8, #Adv9, .gb_area_ads, .msgad, .follower-ad-bottom, .adsense-header, div[data-clickadilla-banner], .hotel-ad, .jw-ad-label, .lj-like-item, .spon-img[src*=".alicdn."], .cookies-modal, #intro_ad_1, #ad-mid-rect, .a-icon-share-pinterest, #ad-base, #homepage_top_ads, #left_ads, #left_adv, .Sailthru_Subscribe, .ad-vertical, #taboola-below-article-thumbnails-mg, #eucookienotice, #leaderAdContainer, .nav-ads, .js-ad_iframe, .grey-ad-notice, #infos_cookie, .doubleClickAd, .navbar-header-ad, #advertising_wrapper, .etn-ad-text, #adsDisplay, #AdSpaceLeaderboard, #adspace_header, .adz-horiz, #inArticleAdv, .ac_adbox, .ad-hoverable, .buySellAdsContainer, #taboola-below-article-thumbnails-v2, .ad-box-auto, .resp-sharing-button, .rekl_left, .guide__row--fixed-ad, .masthead__ad, .primis-player__container, #close-fixedban, .sets-cookie, .frAd, .social_knopki, .ad400x40, .socialList-type03, #adv