A tiny, dependency-free Python script to merge a Tencent Working (腾讯工蜂) merge request from the command line, since the web UI's "Merge" button has no first-class CLI counterpart.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ctypes | |
| import struct | |
| import sys | |
| from ctypes import wintypes | |
| def cpuid(leaf: int, subleaf: int = 0) -> tuple[int, int, int, int]: | |
| # Define VirtualAlloc and VirtualFree | |
| kernel32 = ctypes.WinDLL('kernel32', use_last_error=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ( | |
| "reflect" | |
| "strings" | |
| "gopkg.in/yaml.v3" | |
| ) | |
| // StructToMap converts a struct to a map[string]any recursively. | |
| func StructToMap(s any, tagKey string) map[string]any { | |
| out := make(map[string]any) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """Replace full-width (CJK) punctuation with ASCII equivalents in Markdown. | |
| Intended for English Markdown documents that accidentally contain stray | |
| full-width punctuation copy-pasted from a Chinese source, without | |
| disturbing code blocks or inline code spans. | |
| Features | |
| -------- |
OlderNewer