Skip to content

Instantly share code, notes, and snippets.

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SysProgs\WinCDEmu]
"MkISOFsFlags"="-r -J "
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WcmSvc\GroupPolicy]
"fMinimizeConnections"=dword:00000000
@maokwen
maokwen / procedure-to-archive-git-branches.md
Created January 17, 2024 07:59 — forked from zkiraly/procedure-to-archive-git-branches.md
Procedure to archive git branches.
$variables = [ordered]@{
POWERSHELL_CLI_TELEMETRY_OPTOUT = "1"
POWERSHELL_TELEMETRY_OPTOUT = "1"
POWERSHELL_UPDATECHECK = "Off"
POWERSHELL_UPDATECHECK_OPTOUT = "1"
DOTNET_CLI_TELEMETRY_OPTOUT = "1"
DOTNET_TELEMETRY_OPTOUT = "1"
}
foreach ($target in "User","Machine") {
@maokwen
maokwen / enable-hyper-v.bat
Created April 20, 2023 15:07
Enable WSA on Windows home edition
dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt
for /f %%i in ('findstr /i . hyper-v.txt 2^>nul') do dism /online /norestart /add-package:"%SystemRoot%\servicing\Packages\%%i"
del hyper-v.txt
Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL
@maokwen
maokwen / json_to_translation.ps1
Last active October 18, 2022 10:50
Turing Complete 翻译时用到的脚本
# 将由 ParaTranz 生成的 json 格式转换为待上传的格式
# Usage: json_to_translation.ps1 stage input.json output.txt
# stage: 1.已翻译 3.已校对 5.已审核
$stage = $args[0]
$json = (Get-Content -Encoding utf8 $args[1] | ConvertFrom-Json)
$out = $args[2]
Out-File $out -Encoding utf8 -NoNewline
(Add-Type '[DllImport(\"user32.dll\")]public static extern int SendMessage(int hWnd,int hMsg,int wParam,int lParam);' -Name a -Pas)::SendMessage(-1,0x0112,0xF170,2)
@maokwen
maokwen / AutoHotKey-Lock-Chinese-IME.ahk
Last active February 12, 2025 14:04
AutoHotKey 锁定微软拼音中英文切换
#Include %A_ScriptDir%
timeInterval := 500
; +-------------------------+-------------------------+
; | SubLanguage ID | Primary Language ID |
; +-------------------------+-------------------------+
; 15 10 9 0 bit
InChs() {
@maokwen
maokwen / install.reg
Created March 12, 2021 18:22
Calculate Hash Context Menu
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\hash]
"MUIVerb"= "Calcu Hash"
"SubCommands"=""
"Icon"="PowerShell.exe"
; SHA1
[HKEY_CLASSES_ROOT\*\shell\hash\shell\01menu]
"MUIVerb"="SHA1"
@maokwen
maokwen / Add Take Ownership to Context menu.reg
Created March 10, 2021 17:44
Take Ownership Menu Hacks
Windows Registry Editor Version 5.00
; created by Walter Glenn
; for How-To Geek
; article: https://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/
[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"NoWorkingDirectory"=""