Skip to content

Instantly share code, notes, and snippets.

@VNGXR
VNGXR / win12.xml
Created August 21, 2020 09:20 — forked from jp1995/win12.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh edit win12
or other application using the libvirt API.
-->
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<name>win12</name>
<uuid>5bb658fe-898c-4d7f-bd09-955f4e0cf387</uuid>
@VNGXR
VNGXR / setup.sh
Last active January 6, 2023 07:56 — forked from MakiseKurisu/setup.sh
Proxmox VE 6 GPU Passthrough
#!/bin/bash
# Reference guides:
# https://wiki.archlinux.org/index.php/PCI_passthrough_via_OVMF
# https://pve.proxmox.com/wiki/Pci_passthrough
# https://pve.proxmox.com/wiki/Nested_Virtualization
# Remember to turn on SVM in BIOS and disable CSM
# Update packages
import Foundation
public struct OrderedSet<Element: Hashable>: Collection, ExpressibleByArrayLiteral {
public typealias Index = Int
private var set: Set<Element> = []
private var storage: [Element] = []
public init(arrayLiteral elements: Element...) {
self.init(elements)
@VNGXR
VNGXR / Authenticated.swift
Created March 18, 2020 12:38 — forked from maximkrouk/Authenticated.swift
Property wrapper for secured actions
import Foundation
import LocalAuthentication
@propertyWrapper
public class Authenticated {
public typealias Action = () -> Void
private var _action: Action = {}
public var reason: String
import SwiftUI
public struct Component<Target, Coordinator, Body: View>: View {
private var makeBody: () -> Body
public var body: Body { makeBody() }
}
#if os(macOS)
public struct _ViewBody<Target: NSView, Coordinator>: NSViewRepresentable {
internal var _makeTarget: (Context) -> Target