Skip to content

Instantly share code, notes, and snippets.

View michaelengel's full-sized avatar

Michael Engel michaelengel

View GitHub Profile
@penk
penk / README.md
Last active October 16, 2024 22:31

How to work with x86_64 binaries in the ARM64 Linux VM on top of M1 macOS Host

Let's take Qt online installer and Qt Creator as an example.

Requirements

At the time of this writing:

@imbushuo
imbushuo / simplevm.c
Last active March 20, 2025 05:02
Demonstrates Hypervisor.Framework usage in Apple Silicon
// simplevm.c: demonstrates Hypervisor.Framework usage in Apple Silicon
// Based on the work by @zhuowei
// @imbushuo - Nov 2020
// To build:
// Prepare the entitlement with BOTH com.apple.security.hypervisor and com.apple.vm.networking WHEN SIP IS OFF
// Prepare the entitlement com.apple.security.hypervisor and NO com.apple.vm.networking WHEN SIP IS ON
// ^ Per @never_released, tested on 11.0.1, idk why
// clang -o simplevm -O2 -framework Hypervisor -mmacosx-version-min=11.0 simplevm.c
// codesign --entitlements simplevm.entitlements --force -s - simplevm
@rsnemmen
rsnemmen / save-url-safari-tabs.scpt
Last active January 30, 2025 00:50
Apple script to save the URLs of all currently open tabs in Safari to a text file
-- Set up the initial document
set output to ("List of open tabs in Safari" & linefeed as string) & "=======================" & linefeed as string
tell application "Safari"
-- Count the number of Windows
set numWindows to number of windows
repeat with w from 1 to numWindows