Skip to content

Instantly share code, notes, and snippets.

View mxxntype's full-sized avatar
⚜️
At the door to the tenth sublevel

mxxntype ༒ mxxntype

⚜️
At the door to the tenth sublevel
  • RTU MIREA
  • /dev/tty
View GitHub Profile
@mxxntype
mxxntype / vfio_looking_glass.xml
Created October 23, 2024 23:03
XML dump of working KVMFR device for QEMU+VFIO setups
<domain xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0" type="kvm">
<name>atlasOS_win10</name>
<uuid>d2bb2761-0c26-4782-9450-dc51b75a3359</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">8388608</memory>
<currentMemory unit="KiB">8388608</currentMemory>
@mxxntype
mxxntype / zen-browser.nix
Last active June 26, 2025 13:56
Package the Zen browser for Nix, and set it as the default one
# NOTE: I manually package the Zen browser for myself.
#
# HACK: This does, however, mean that I will need to manually
# tweak the `version` and `hash` here if I wish to update it.
# This produces the package (derivation):
(let version = "1.0.0-a.37"; in pkgs.appimageTools.wrapType2 {
inherit version;
name = "zen"; # NOTE: This will be the name of the executable in $PATH.
src = pkgs.fetchurl {
@mxxntype
mxxntype / rust_cover_art_extraction.rs
Last active October 9, 2024 19:03
A snippet of getting the cover art (APIC frame) from a music file. For later use :)
use eyre::{Context, ContextCompat, Report};
use id3::{Content, Tag, TagLike};
use image::ImageReader;
use std::{env, io::Cursor};
fn main() -> Result<(), Report> {
color_eyre::install()?;
get_cover_art(env::args().nth(1).unwrap().as_str())?;
Ok(())
}
@mxxntype
mxxntype / eyre_spantrace_usage.rs
Last active January 25, 2025 18:51
A snippet of using eyre::Report
use color_eyre::eyre::Report;
fn main() -> Result<(), Report> {
color_eyre::install()?;
install_tracing()?;
let int = 512;
let string = "sample";
tracing::info!(?int, ?string, "Sample log message");