Skip to content

Instantly share code, notes, and snippets.

@OKsign
OKsign / gist:11524435e65aebe0f3209a8aabc7bf07
Created June 30, 2026 03:56
Commands - Install Mac OS X 10.0 via QEMU on Windows 11
cd C:\Users\squid\Downloads\Qemu
qemu-img create -f vmdk C:\Users\squid\Downloads\Qemu\MacintoshSSD.vmdk 6G
qemu-system-ppc -L pc-bios -boot d -M mac99 -m 2048 -hda C:\Users\squid\Downloads\Qemu\MacintoshSSD.vmdk -cdrom C:\Users\squid\Downloads\osx_100_4k78_install.iso
#IfWinActive ahk_exe Notepad.exe
$a::
KeyWait,a
KeyWait,a,D T0.04
If ErrorLevel
Send a
else
Send x
return
#IfWinActive
F1::
Winget,AppName,ProcessName,A
MsgBox,% AppName
$c::
aDown:=A_TickCount
Keywait c
Duration:=(A_TickCount-aDown)
If (Duration>800) and WinActive("ahk_exe soffice.bin")
Send +^a
Else
Send c
Return
{"title": "paste with button 4.json",
"rules": [
{ "description": "paste with button 4.json",
"manipulators": [
{"from": { "pointing_button": "button4" },
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300,
"basic.to_if_held_down_threshold_milliseconds": 500},
"to_if_alone": [
{"key_code": "v",
"modifiers": [
{"title": "copy with button 5.json",
"rules": [
{ "description": "copy with button 5.json",
"manipulators": [
{"from": { "pointing_button": "button5" },
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300,
"basic.to_if_held_down_threshold_milliseconds": 500},
"to_if_alone": [
{"key_code": "c",
"modifiers": [
{ "title": "paste with right option",
"rules": [
{ "description": "paste with right option",
"manipulators": [
{"from": { "key_code": "right_option" },
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300},
"to_if_alone": [{
"key_code": "v",
"modifiers": [
"left_command"
{ "title": "copy with right command",
"rules": [
{ "description": "copy with right command",
"manipulators": [
{"from": { "key_code": "right_command" },
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300},
"to_if_alone": [{
"key_code": "c",
"modifiers": [
"left_command"
-- Important Note: This script will delete all files in the target folder including CloudRecordings.db, CloudRecordings.db-wal and CloudRecordings.db-shm. I assume those 3 files are about iCloud so if you use iCloud for Voice Memos, don't use this script. If you don't use iCloud for Voice Memos, what you should do is create multiple recordings for testing this script then test it. In the future, something may change this script might not work. You should prepare for that.
if application "VoiceMemos" is running then
tell application "VoiceMemos" to quit
end if
set info to system info
set userName to short user name of info
set upath to "/Users/" & userName & "/Library/Group Containers/group.com.apple.VoiceMemos.shared/Recordings"
set tar_path to quoted form of POSIX path of upath
@OKsign
OKsign / Script 60.txt
Last active August 18, 2024 10:28
Close all windows of Finder but the active one on macOS
-- Stage Manager must be turned off
tell application "System Events"
tell application "Finder"
activate
delay 0.5
set activewinname to get name of front window
set winc to count of windows
end tell
end tell