Skip to content

Instantly share code, notes, and snippets.

View brunocastello's full-sized avatar

Bruno Castelló brunocastello

View GitHub Profile
@brunocastello
brunocastello / Inspector.swift
Created June 5, 2023 22:57
New SwiftUI Inspector code
struct ContentView: View {
@State var showInspector = false
var body: some View {
NavigationSplitView {
Text("Hello")
} detail: {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
[General]
vid_renderer = qt_vulkan
confirm_exit = 0
video_gl_framerate = 30
video_gl_vsync = 1
sound_gain = 18
video_fullscreen_scale = 3
video_filter_method = 0
video_fullscreen_first = 0
@brunocastello
brunocastello / mkicon
Created July 14, 2022 04:04
Bash Shell Script to generate ICNS files for macOS
#!/bin/bash
rm -R $2.iconset
mkdir $2.iconset
sips -z 16 16 "$1" --out $2.iconset/icon_16x16.png
sips -z 32 32 "$1" --out $2.iconset/icon_16x16@2x.png
sips -z 32 32 "$1" --out $2.iconset/icon_32x32.png
sips -z 64 64 "$1" --out $2.iconset/icon_32x32@2x.png
sips -z 128 128 "$1" --out $2.iconset/icon_128x128.png
sips -z 256 256 "$1" --out $2.iconset/icon_128x128@2x.png
sips -z 256 256 "$1" --out $2.iconset/icon_256x256.png
@brunocastello
brunocastello / WinXP.sh
Last active December 2, 2022 20:31
Run Windows XP SP3 with QEMU-3Dfx
#!/bin/sh
qemu-3dfx/bin/qemu-system-i386 \
-name "Windows 2002 Professional" \
-L pc-bios -nodefaults -no-hpet -no-reboot -display sdl \
-M pc,accel=tcg -cpu qemu32 -m 1024 \
-drive id=root,format=raw,file=Disks/WinXP.img \
-drive id=drive1,media=cdrom \
-device VGA -device sb16 -device rtl8139,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::8080-:80,hostfwd=tcp::2222-:22 \
-rtc base=localtime,clock=host -boot c
@brunocastello
brunocastello / Win98.sh
Last active May 16, 2022 17:38
Run Windows 98 SE with QEMU-3Dfx
#!/bin/sh
qemu-3dfx/bin/qemu-system-i386 \
-name "Windows 98" \
-L pc-bios -nodefaults -no-hpet -no-reboot -display sdl \
-M pc,accel=tcg -cpu pentium3 -m 1024 \
-drive id=root,format=raw,file=Disks/Win98.img \
-drive id=drive0,media=cdrom \
-device VGA -device sb16 -device rtl8139,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::8080-:80,hostfwd=tcp::2222-:22 \
-rtc base=localtime,clock=host -boot c
@brunocastello
brunocastello / Win311.sh
Last active January 2, 2022 05:54
Run DOS 6.22/Windows 3.x with QEMU (Follow this guide for installation: https://computernewb.com/wiki/How_to_install_Windows_3.1_in_QEMU)
#!/bin/sh
qemu-system-i386 \
-name "Windows 3.11" \
-nodefaults -no-reboot \
-M pc,accel=tcg -cpu pentium2 -m 64 \
-drive id=root,format=raw,file=Disks/Win311.img \
-drive id=drive1,media=cdrom \
-device "vmware-svga" -device sb16 -device pcnet,netdev=net0 \
-netdev user,id=net0,hostfwd=tcp::8080-:80,hostfwd=tcp::2222-:22 \
-rtc base=localtime,clock=host -boot ca
@brunocastello
brunocastello / OSXLeopard.sh
Last active January 2, 2022 05:55
Run OS X Leopard 10.5 (PowerPC) with QEMU Screamer fork (Follow this thread for more info: https://www.emaculation.com/forum/viewtopic.php?t=10784)
#!/bin/sh
./qemu-screamer/qemu-system-ppc-screamer -L qemu-screamer/pc-bios \
-name "OS X Leopard 10.5" \
-M mac99,via=pmu -cpu G4 -m 2048 \
-prom-env 'auto-boot?=true' -prom-env 'vga-ndrv?=true' \
-drive id=root,file=Disks/OSXLeopard.img,format=qcow2,l2-cache-size=4M \
-netdev user,id=network01 -device sungem,netdev=network01 \
-device VGA,edid=on -g 1920x1080x32 \
-rtc base=localtime,clock=host -boot c -no-reboot
@brunocastello
brunocastello / macOS9.sh
Last active November 28, 2021 07:03
Run MacOS9 with QEMU Screamer fork for working audio
#!/bin/sh
# Follow the steps of this guide first: https://jamesbadger.ca/2018/11/07/emulate-mac-os-9-with-qemu/
#
# MOUSE INTEGRATION BETWEEN QEMU HOST AND MACOS9 GUEST
# ----------------------------------------------------
# Use "-M mac99,via=pmu" and remove the "-device usb-kbd -device usb-tablet" before installing USBTablet
# (https://github.com/kanjitalk755/macos9-usb-tablet), then change back to "-M mac99" and re-add the removed
# usb devices above mentioned ("-device usb-kbd -device usb-tablet").
#
./qemu-screamer/bin/qemu-system-ppc -L qemu-screamer/pc-bios \