Skip to content

Instantly share code, notes, and snippets.

@0chroma
0chroma / VFIO Setup Guide.md
Last active March 12, 2024 13:49
Windows 10 VFIO QEMU Setup

VFIO Setup Guide

I play games regularly, and the sad reality is that it forces me to use Windows on my desktop. There's a Linux installation on there, but rebooting into it is such a massive interruption that I usually just move over to my laptop for programming. Working on a laptop leads to all sorts of ergonomic issues, and it felt like a massive waste to not develop on the desktop hardware I invested so much in. So after extensively researching what the VFIO community has been doing, I've deleted my Windows installation and moved all my gaming into a virtual machine on a Linux host.

Normally VMs are too slow for gaming, but thanks to a feature called VFIO you can run games at near-native performance by passing graphics cards and USB controllers directly to a virtual machine. The only requirement is that your board supports IOMMU, which most modern systems have. In this guide I'll wal

@0chroma
0chroma / await.js
Last active August 29, 2015 14:13
the only es7 feature I care about
var promises = [1,2,3,4,5].map((i) => {
return new Promise((resolve) => {
setTimeout(() => resolve("test!"), i*1000);
});
});
promises.forEach(async (p) => console.log(await p));
var HashTable = function(name){
this.name = name;
this.table = {};
}
HashTable.prototype.get = function(key){
return this.table[key];
}
HashTable.prototype.set = function(key, value){
@0chroma
0chroma / hacking-into-the-pentagon.service
Last active January 25, 2024 18:19
a systemd service that hacks the pentagon when ur system turns on, turns ur pc into a sick 1337 hacking machine
#a systemd service that hacks the pentagon when ur system turns on
#turns ur pc into a sick 1337 hacking machine
[Unit]
Description=Hacking into the pentagon
[Service]
Type=simple
ExecStart=/bin/sh -c "ping defense.gov"
@0chroma
0chroma / jerk.js
Created January 13, 2013 08:05
I'm so sorry
var jerk = function(num, i, original){
if(!i) i=1;
var out = {id: i};
if(!original) original = out;
if(i == num)
out.jerk = original;
else