Skip to content

Instantly share code, notes, and snippets.

View erbanku's full-sized avatar
Contributing to OSS

Cactus erbanku

Contributing to OSS
View GitHub Profile
@erbanku
erbanku / Resolve-WindowsGUID.ps1
Created March 7, 2026 13:48 — forked from davehull/Resolve-WindowsGUID.ps1
Useful for resolving some Windows GUIDs to human friendly values
<#
.SYNOPSIS
Resolves many Windows GUIDs to human friendly values.
.DESCRIPTION
Resolve-WindowsGUID.ps1 takes a GUID from a Windows system and attempts
to return a human friendly value from either a static list or from a
dynamically generated list of LogProvider GUIDs. There are undoubtedly
other GUIDs in use throughout Windows that will not fall into either of
these sets. If you encounter a GUID that you can't resolve via this
@erbanku
erbanku / claude_conversation_convertor.py
Last active March 6, 2026 05:28
Created by Cactus with ♥ using GitHub-CLI at Fri 03/06/2026 13:25 +08:00 (1772774756)
import json
import os
import re
import argparse
from datetime import datetime
def parse_time(ts: str):
try:
return datetime.fromisoformat(ts.replace("Z", "+00:00"))
@erbanku
erbanku / convert_memos.py
Last active February 11, 2026 07:52
Memos to Markdown Converter: Convert Memos (v0.21 tested) JSON export into a single Markdown file
import json
from datetime import datetime, timezone, timedelta
def safe_datetime(ts):
if ts is None or ts == 0:
return None
if ts > 9999999999:
ts = ts / 1000
try:
@erbanku
erbanku / conventional-commits-cheatsheet.md
Created January 12, 2026 03:00 — forked from qoomon/conventional-commits-cheatsheet.md
Conventional Commits Cheatsheet
@erbanku
erbanku / UI Access.md
Created October 27, 2025 13:17 — forked from anonymous1184/UI Access.md
Run scripts with UI Access (UIA)

UI Access (UIA)

What's UI Access?

UIA is the way around UIPI ([User Interface Privilege Isolation][1]) which in simple terms is a way of bypassing the security built into Windows to avoid applications interacting with other applications that have a higher integrity level (security).

In other words, when you run a script it cannot communicate with the system or elevated (running as Administrator) processes; this is to avoid insecure and non-sanctioned interactions.

Why would I want UIA?

@erbanku
erbanku / -manage-chrome-search-engines.md
Created October 20, 2025 15:06 — forked from masonwan/-manage-chrome-search-engines.md
Better way to manage Chrome's search engines

Problem

Chrome has the feature to automatically add search engine when it detects an input field on websites. After using Chrome months, it often resutls a bunch of search engines stayed in the settings. And the setting page does not provide a convinient way to remove them.

Updates on 2024-11-21

The editting the Web Data as SQLite file did not seem to work anymore. Chrome seems to revert all the changes when restart.

To make it even worse, it seems that the DOM tree is not accessable from the development console on the setting page, so even a bookmarklet could not work. Neighter does Chrome provide an API to access the search engines.

@erbanku
erbanku / you_are_not_right.sh
Created October 13, 2025 13:50 — forked from ljw1004/you_are_not_right.sh
A UserPromptSubmit hook for Claude Code to stop it saying "You're right"
#!/bin/bash
set -euo pipefail
trap 'echo "at line $LINENO, exit code $? from $BASH_COMMAND" >&2; exit 1' ERR
# This is a Claude Code hook to stop it saying "you are right".
#
# Installation:
# 1. Save this script and chmod +x it to make it executable.
# 2. Within Claude Code, /hooks / UserPromptSubmit > Add a new hook (this file)
#
@erbanku
erbanku / autohotkey-snapshot-file-with-timestamps.ahk
Created May 25, 2025 14:59
(Windows-IRX9) Created by Cactus with ♥ using GitHub-CLI at Sun 05/25/2025 22:59 +08:00 (1748185170)
#Requires AutoHotkey v2.0
#SingleInstance Force
^+s::
{
; Configuration
destFolder := "D:\OneDrive\Documents\Snapshots"
; Create destination folder if it doesn't exist
if !DirExist(destFolder) {
@erbanku
erbanku / update-mathpix-notes-archive-online-images-to-local.py
Last active May 22, 2025 10:07
Update Mathpix Notes archive online images to local (including updating links in the file).
import os
import re
import requests
from urllib.parse import urlparse
def download_file(url, folder):
parsed_url = urlparse(url)
filename = os.path.basename(parsed_url.path)
base, ext = os.path.splitext(filename)
@erbanku
erbanku / wsl_clash_proxy.sh
Created March 7, 2025 12:56 — forked from libChan/wsl_clash_proxy.sh
WSL2使用clash for windows代理
# WSL通过Win访问网络,所以WSL的网关指向的是Windows,DNS服务器指向的也是Windows,设置WSL的proxy为win的代理ip+端口即可
# WSL中的DNS server在/etc/resolv.conf中查看,该文件是由/etc/wsl.conf自动生成的。
# 如果关闭了wsl.conf中自动生成resolve.conf并自行修改了resolve.conf,DNS nameserver并不是本机win ip
# 需要开启wsl.conf的自动生成,再运行以下命令
# https://zhuanlan.zhihu.com/p/153124468
# 添加到环境变量设置中,例如~/.zshrc
export hostip=$(cat /etc/resolv.conf |grep -oP '(?<=nameserver\ ).*')
export https_proxy="http://${hostip}:7890"
export http_proxy="http://${hostip}:7890"