Skip to content

Instantly share code, notes, and snippets.

View hyperparabolic's full-sized avatar

Spencer Balogh hyperparabolic

View GitHub Profile
@hyperparabolic
hyperparabolic / test.js
Created January 6, 2020 22:14
Reproduce: Mongoose slice followed by any operation that calls `cast` during the following operation results in an error
const Mongoose = require('mongoose');
const { Schema } = Mongoose;
const xSchema = new Schema({
a: [String],
});
const X = Mongoose.model('X', xSchema);
#!/bin/sh
# This is a script for binding vfio-pci drivers to
# video cards when there are multiple copies of the
# same card and ids cannot be used.
# install this to /sbin, and add this to modprobe.d:
# install vfio-pci /sbin/vfio-pci-override.sh
for i in /sys/devices/pci*/*/*/boot_vga; do
#!/bin/bash
shopt -s nullglob
for d in /sys/kernel/iommu_groups/*/devices/*; do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done;
### Keybase proof
I hereby claim:
* I am hyperparabolic on github.
* I am hyperparabolic (https://keybase.io/hyperparabolic) on keybase.
* I have a public key ASDs4q24wX2ei3YtlYoYfLHXrSWVLbPgS1Bivh9Dng7JWAo
To claim this, I am signing this object: