Skip to content

Instantly share code, notes, and snippets.

@atatsu
atatsu / void-arch-vga-passthrough.md
Last active May 27, 2020 15:00
Adventures in VGA passthrough land

Install packages

  • virt-manager
  • libvirt
  • qemu
    • usermod -aG kvm <username>
    • modprobe kvm-amd
  • ovmf
    • isn't available for Void... copying the binaries from my old Arch install and we'll see what happens
  • ebtables (networking)
  • dnsmasq (networking)
@atatsu
atatsu / color_of_the_day.py
Created November 29, 2016 05:14
color of the day
#!/usr/bin/env python
# py3
"""
$ ./color_of_the_day.py -h
usage: color_of_the_day.py [-h] [--full-summary] days_in_future
Determines car color for future date.
positional arguments:
days_in_future Number of days in the future to determine color
@atatsu
atatsu / session.py
Created October 24, 2012 17:26
Django/Redis session storage as json
import json
from redis_sessions.session import SessionStore as RedisSessionStore
class SessionStore(RedisSessionStore):
def encode(self, session_dict):
json_ = json.dumps(session_dict)
return json_
def decode(self, session_data):