qemu-system-x86_64 -enable-kvm \
-m 4G -smp 4 \
-device virtio-vga-gl,xres=1280,yres=720 \
-serial mon:stdio \
-display sdl,gl=on,show-cursor=on \
-usb -device usb-mouse -device usb-kbd -device usb-tablet \
-net user,hostfwd=tcp::8022-:22 -net nic \
-drive format=raw,file=chromiumos_qemu_image.bin
This file contains 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
FROM node:22 | |
WORKDIR /srv | |
COPY rep.sh . | |
RUN chmod +x rep.sh | |
RUN ./rep.sh | |
WORKDIR /srv/vite-bug | |
CMD [ "yarn", "dev", "--host", "0.0.0.0" ] |
This file contains 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
[package] | |
name = "dns" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
tokio = { version = "1", features = ["full"] } | |
hickory-server = "0.24.1" |
This file contains 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
mkdir mydest ; cd mydest | |
git init | |
git remote add origin https://git.deuxfleurs.fr/Deuxfleurs/garage.git | |
git fetch origin 703ac43f1c7c0538ac72a06afc16ad182c3aaba1 | |
git checkout 703ac43f1c7c0538ac72a06afc16ad182c3aaba1 -b branch_name |
This file contains 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
foc = 45 * pow(10, -3) | |
conf = 0.03 * pow(10, -3) | |
for ouv in [3.5, 4, 5.6, 8, 11, 16]: | |
hyper = (foc * foc) / (ouv * conf) + foc | |
ppn = (hyper * hyper) / (hyper + (hyper - foc)) | |
print(f"{ouv} {round(hyper, 1)}m {round(ppn, 1)}m") | |
for ouv in [3.5, 4, 5.6, 8, 11, 16]: | |
hyper = (foc * foc) / (ouv * conf) + foc | |
for p in [1, 1.25, 1.5, 1.75, 2, 2.5, 3, 4, 5, 7, 10, 20]: |
This file contains 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
package main | |
import ( | |
"bufio" | |
"os" | |
"crypto/aes" | |
"crypto/cipher" | |
"encoding/hex" | |
"errors" | |
"fmt" |
This file contains 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
import xmltodict,collections,csv | |
def group(v, out): | |
if 'Entry' in v: | |
item = v['Entry'] | |
if isinstance(item, collections.OrderedDict): | |
entry(item, out) | |
elif isinstance(item, list): | |
for e in item: | |
entry(e, out) |
This file contains 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::*; | |
trait ListAcc{ | |
// This is an associated type, a specific type of Generics | |
// You can also search for "Rust Associated Items" to know more about this concept | |
// Similarly to generics, we can set some bounds (ie. traits) on this type | |
// Here we chose our own Wave Trait and the std Clone trait | |
type E: Wave + Clone; | |
// Note the return type "Self::E", this is how we use an associated type |
Install FIO on Ubuntu/Debian:
sudo apt update
sudo apt install -y fio lshw
Install FIO on Fedora:
This file contains 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/sh | |
# | |
# This is a simple kernel hook to populate the systemd-boot entries | |
# whenever kernel images are added or removed. | |
# Author: https://p5r.uk/blog/2020/using-systemd-boot-on-debian-bullseye.html | |
# The disk containing the root partition; also see `sudo blkid` | |
root_disk="UUID=$(findmnt / -o UUID -n)" |
NewerOlder