Skip to content

Instantly share code, notes, and snippets.

View swipswaps's full-sized avatar

#swipswaps swipswaps

View GitHub Profile

GPU Passthrough on Arch

This is the steps I used to successfully get GPU passthrough on Arch after switching from Debian.

Enable IOMMU

  1. Open /etc/default/grub
  2. Add intel_iommu=on and iommu=pt to the GRUB_CMDLINE_LINUX_DEFUALT field.
  3. Save
  4. Run sudo update-grub
  5. Running this script:
using System;
using System.Collections.Generic;
using AirSimUnity.DroneStructs;
using UnityEngine;
namespace AirSimUnity
{
[RequireComponent(typeof(Drone))]
public class DroneControllerInput : MonoBehaviour
{
@swipswaps
swipswaps / hello_drone3.py
Created March 24, 2021 15:52 — forked from jasonhbartlett/hello_drone3.py
hello_drone3.py flies the drone in a simple WWWWW flight pattern.
import setup_path
import airsim
import numpy as np
import os
import tempfile
import pprint
import time
/**
* Author: David Asmuth
* Contact: [email protected]
* License: Public domain
*
* Converts the .fbx model
* from Blender orientation system (Z is up, Y is forward)
* to the Unity3D orientation system (Y is up, Z is forward)
*/
using System.IO;
@swipswaps
swipswaps / ScriptableObjectWindow.cs
Created March 24, 2021 15:51 — forked from pencilking2002/ScriptableObjectWindow.cs
View and edit all your Scriptable Objects in a single Editor Window
using UnityEngine;
using UnityEditor;
using Object = UnityEngine.Object;
using System;
// DESCRIPTION
// This is a Unity editor script that allows you to view and edit all your Scriptable Objects in one Editor Window
// INSTRUCTIONS
// In Unity, place this file in an Editor folder.
@swipswaps
swipswaps / Drone.cs
Created March 24, 2021 15:47 — forked from TwoTenPvP/Drone.cs
A script for Unity3D game engine that adds Easy to control Drone movement. To use, add a Axis called Altitude and set Positive to Shift and negative to Ctrl
using UnityEngine;
public class Drone : MonoBehaviour
{
public float AltitudeSensitivity = 5;
public float UpwardMultiplier = 0.99f;
private Rigidbody _myRigidbody;
private Transform _myTransform;
public float ForwardSpeed = 1;
public float SpinSpeed = 10;
@swipswaps
swipswaps / export_fbx_bin.py
Created March 24, 2021 15:18 — forked from LeonBlade/export_fbx_bin.py
A modified version of the FBX binary export script for FFXV mods.
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@swipswaps
swipswaps / FixMeshRotationEditor.cs
Created March 24, 2021 15:17 — forked from blizzy78/FixMeshRotationEditor.cs
FixMeshRotationEditor.cs - Unity: Fix mesh's rotation after importing from Blender
using UnityEngine;
using UnityEditor;
/*
Fixes a mesh's rotation after importing it from Blender. In Blender, the Z axis points in the
"up" direction, while in Unity, Z points in the "forward" direction. This script rotates the
mesh's vertices so that it is upright again.
To use this, create an object from a mesh in the hierarchy view, then locate the Mesh Filter
in the inspector. There, click on the new "Fix Rotation" button.
@swipswaps
swipswaps / Unity_tools.py
Created March 24, 2021 15:17 — forked from richy486/Unity_tools.py
Fix for Blender .blend files being loaded in Unity3D.
import bpy
bl_info = {
"name": "Unity Tools",
"author": "Karol \"Mirgar\" Głażewski",
"version": (1, 0, 2),
"blender": (2, 6, 5),
"location": "3D View > Tool Shelf > Unity Tools",
"description": "Tools to ease workflow with Unity Engine",
"warning": "",
@swipswaps
swipswaps / setup.sh
Created March 14, 2021 17:44 — 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