Skip to content

Instantly share code, notes, and snippets.

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

@jauderho
jauderho / gist:6b7d42030e264a135450ecc0ba521bd8
Last active April 29, 2024 13:48
HOWTO: Upgrade Raspberry Pi OS from Bullseye to Bookworm
### WARNING: READ CAREFULLY BEFORE ATTEMPTING ###
#
# Officially, this is not recommended. YMMV
# https://www.raspberrypi.com/news/bookworm-the-new-version-of-raspberry-pi-os/
#
# This mostly works if you are on 64bit. You are on your own if you are on 32bit or mixed 64/32bit
#
# Credit to anfractuosity and fgimenezm for figuring out additional details for kernels
#
@peterc
peterc / Caddyfile
Last active March 16, 2024 11:52
Caddyfile for running Mastodon – November 2022 edition
put.your.domain.here {
@local {
file
not path /
}
log {
output file /var/log/caddy/mastodon.log
}
@davidahouse
davidahouse / UIHostingController+Extension.swift
Created November 19, 2020 12:35
Capture a SwiftUI view to a UIImage
extension UIHostingController {
func capture() -> UIImage {
let size = sizeThatFits(in: UIScreen.main.bounds.size)
view.bounds.size = size
view.sizeToFit()
UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.isOpaque, 0)
view.drawHierarchy(in: view.bounds, afterScreenUpdates: true)
let snapshotImage: UIImage = UIGraphicsGetImageFromCurrentImageContext()!
UIGraphicsEndImageContext()
@probonopd
probonopd / Wayland.md
Last active May 2, 2024 12:20
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

//
// ContentView.swift
//
//
// Created by Bernstein, Joel on 7/4/20.
//
import SwiftUI
struct ElementModel: Identifiable
@swiftui-lab
swiftui-lab / SwiftUI-view-to-UIImage.swift
Created July 5, 2020 19:43
A method for converting a SwiftUI into a UIImage
//
// ContentView.swift
// Grabber
//
// SwiftUI-Lab
//
// For more information on the techniques used in this example, check
// The Power of the Hosting+Representable Combo (https://swiftui-lab.com/a-powerful-combo/)
import SwiftUI
@ccwasden
ccwasden / WithPopover.swift
Created February 5, 2020 13:39
Custom size popover in iOS SwiftUI
// -- Usage
struct Content: View {
@State var open = false
@State var popoverSize = CGSize(width: 300, height: 300)
var body: some View {
WithPopover(
showPopover: $open,
popoverSize: popoverSize,
@SatoTakeshiX
SatoTakeshiX / convert.swift
Last active August 31, 2023 09:10
Take capture a view by SwiftUI
//
// ContentView.swift
// TryGeometryReader
//
// Created by satoutakeshi on 2019/12/07.
// Copyright © 2019 satoutakeshi. Licensed under MIT.
//
import SwiftUI
@bigmountainstudio
bigmountainstudio / GruvBox.xccolortheme
Last active March 29, 2024 18:54
Xcode Theme: GruvBox
<!-- Add this file to: ~/Library/Developer/Xcode/UserData/FontAndColorThemes -->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>DVTConsoleDebuggerInputTextColor</key>
<string>0.901961 0.831373 0.639216 1</string>
<key>DVTConsoleDebuggerInputTextFont</key>
<string>SFMono-Bold - 11.0</string>
<key>DVTConsoleDebuggerOutputTextColor</key>