This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::collections::{HashMap, HashSet}; | |
use std::fmt; | |
use std::io::Write; | |
use rand::Rng; | |
use rand::seq::SliceRandom; | |
use std::time::Instant; | |
// Structure representing a Virtual Machine | |
#[derive(Debug, Clone)] | |
struct VM { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use List::Util qw(sum max min); | |
use Data::Dumper; | |
# Implementation of the TOPSIS algorithm for load balancing VMs across hypervisors | |
# with support for migrations from an initial placement | |
# Class representing a Virtual Machine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# proxmox-backup-client list --repository root@pam@<Proxmox-Backup-Server-IP>:8007:pbs01 | |
# proxmox-backup-client map vm/100/2021-01-03T17:21:21Z drive-scsi0.img --repository root@pam@<Proxmox-Backup-Server-IP>:8007:pbs01 | |
Image '...' mapped on /dev/loop0 | |
- qm set 100 -scsiN /dev/loop0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#overlay change at each boot | |
if cmp -s "/userdata/system/rgsfix/S02resize-v40fix" "/etc/init.d/S02resize"; then | |
echo "resize fix already applied" | |
else | |
cp /userdata/system/rgsfix/S02resize-v40fix /etc/init.d/S02resize | |
batocera-save-overlay | |
fi | |
#custom mess systems |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"actions_player1": [ | |
{ | |
"trigger": ["hotkey", "start"], | |
"type": "key", | |
"target": [ "KEY_LEFTALT", "KEY_F4" ] | |
}, | |
{ | |
"trigger": "start", | |
"type": "key", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feb 16 16:24:08 batocera kernel: [ 2780.030616] usb 1-10: new full-speed USB device number 8 using xhci_hcd | |
Feb 16 16:24:09 batocera kernel: [ 2780.172452] usb 1-10: New USB device found, idVendor=046d, idProduct=c294, bcdDevice=13.50 | |
Feb 16 16:24:09 batocera kernel: [ 2780.172468] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0 | |
Feb 16 16:24:09 batocera kernel: [ 2780.172474] usb 1-10: Product: G29 Driving Force Racing Wheel | |
Feb 16 16:24:09 batocera kernel: [ 2780.172478] usb 1-10: Manufacturer: Logitech | |
Feb 16 16:24:09 batocera kernel: [ 2780.177369] input: Logitech G29 Driving Force Racing Wheel as /devices/pci0000:00/0000:00:14.0/usb1/1-10/1-10:1.0/0003:046D:C294.0007/input/input25 | |
Feb 16 16:24:09 batocera kernel: [ 2780.234588] logitech 0003:046D:C294.0007: input,hidraw3: USB HID v1.00 Gamepad [Logitech G29 Driving Force Racing Wheel] on usb-0000:00:14.0-10/input0 | |
Feb 16 16:24:09 batocera kernel: [ 2780.251365] usb 1-10: USB disconnect, device number 8 | |
Feb 16 16:24:09 batocera kernel: [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feb 16 15:38:05 batocera kernel: [ 14.335962] usb 1-10: new full-speed USB device number 5 using xhci_hcd | |
Feb 16 15:38:05 batocera kernel: [ 14.478909] usb 1-10: New USB device found, idVendor=046d, idProduct=c294, bcdDevice=13.50 | |
Feb 16 15:38:05 batocera kernel: [ 14.478924] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0 | |
Feb 16 15:38:05 batocera kernel: [ 14.478930] usb 1-10: Product: G29 Driving Force Racing Wheel | |
Feb 16 15:38:05 batocera kernel: [ 14.478935] usb 1-10: Manufacturer: Logitech | |
Feb 16 15:38:05 batocera kernel: [ 14.335962] usb 1-10: new full-speed USB device number 5 using xhci_hcd | |
Feb 16 15:38:05 batocera kernel: [ 14.478909] usb 1-10: New USB device found, idVendor=046d, idProduct=c294, bcdDevice=13.50 | |
Feb 16 15:38:05 batocera kernel: [ 14.478924] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=0 | |
Feb 16 15:38:05 batocera kernel: [ 14.478930] usb 1-10: Product: G29 Driving Force Racing Wheel | |
Feb 16 15:38:05 batocera kernel: [ 14.47 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://mutulin1.odiso.net/qemu-server_8.3.7_amd64.deb | |
dpkg -i qemu-server_8.3.7_amd64.deb | |
qm create 100 -machine microvm -acpi 0 -vga none -serial0 socket -tablet 0 -balloon 0 -args "-kernel /root/netbsd-SMOL -append 'console=com root=ld0a -z'" | |
qm disk import 100 /root/rescue-amd64.img local | |
qm set 100 -virtio0 local:10001/vm-10001-disk-0.raw | |
qm start 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BOOTCONF="/boot/batocera-boot.conf" | |
LOG="/tmp/resize.log" | |
# only at start | |
test "$1" != "start" && exit 0 | |
# true if triggers are not available or not set to do so | |
if ! grep -qE '^[ ]*autoresize[ ]*=[ ]*true[ ]*$' "${BOOTCONF}" && ! grep -qE '^[ ]*format-internal[ ]*=' "${BOOTCONF}"; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCuOCiHblTydAqUvspLQE6zvS4UNnRDirOWzBMCdIaGyFMMW8J/SSxNHwZ6REqFb8tAakE3W4JjSS0pSNgcikVFbmJWmPGUO32dpG5ZqQNNgA5uHccn5VtL2VxMo/ADToRCMDs7NrElgBQ71p/cRaz4dD0gvU7INSa/eRxihM8vVYv8zFNd8VsNa0MLQ7qvxvB3BFpIsqisvJXXkDtQbGNomzq/ViIzCpskB5F2Mf5+UFFRSwYIM6sprum4Rg9G7r9sXyH47o2LE7PByY+zgRljZ1qF28mOZl2oGNIT2p9b4tXViVEyFxP5XCqtYEKluSPWx78Xtho08vyuQhyQw3lOVOV+gIUyOKR2YH1R+dx65Ml6YBqMfRnrG5HTJTlIXHh2vI85JBDwOQoIvzRv7CmAY+Af3cMCSBlfOCnYWD+I8A43SigC8jrotiZtpBY9+C8lt4QT6bKdnC1pUMhguLOg4NiitM/yHjVkXFzT320PPqPesoXXxRPG4QwwE2xffWKGGYYt6zBuaBpIvdPVIlCR8TUOJ0lNoB7FHQQbmudfUurfQDTOLaLvg+P7uGHjtkOcRaLDKTvEvUSg0xes8kE3rc4wThdqGp5NpQF0Ib6Ddwq27AjE57JX0YPYJ9xWcPWi3aL3RyS73KrZfPDivq0iDi6/T/I+umMN/hcWtGkJyw== [email protected] |
NewerOlder