Skip to content

Instantly share code, notes, and snippets.

View pinkforest's full-sized avatar
🦀
💁 cuttin' some 💾

pinkforest(she/her) pinkforest

🦀
💁 cuttin' some 💾
View GitHub Profile
@pinkforest
pinkforest / io_uring_res.txt
Created April 30, 2024 23:49
io_uring resources
https://kernel.dk/io_uring.pdf
https://github.com/axboe/liburing/wiki/io_uring-and-networking-in-2023
https://github.com/axboe/liburing/tree/master/examples
https://unixism.net/2020/04/io-uring-by-example-article-series/
https://thenewstack.io/how-io_uring-and-ebpf-will-revolutionize-programming-in-linux/
/*
match server_thread.join() {
Ok(_) => panic!("should not return w/o panic"),
Err(e) => assert_eq!(e.downcast_ref::<&str>(), Some("COMPLETE").as_ref()),
//panic!("err.. {:?}", e),
} */
@pinkforest
pinkforest / amx.h
Created September 3, 2023 04:37 — forked from dougallj/amx.h
amx simulator and hardware tests
#pragma once
#include <stdint.h>
// TODO: is it possible to not go via x0? I'm guessing not without messing with
// the compile process, but still, kinda ugly. might at least be possible to
// force the compiler to get the value in x0 itself
// TODO: do I need memory as an input?
#define AMX_LDX(V) \
use std::time::Duration;
use lunatic::{net, Mailbox, Process, sleep};
#[lunatic::main]
fn main(_: Mailbox<()>) {
Process::spawn("".to_string(), wait_ping);
loop {
Process::spawn("".to_string(), send_ping);

I was ready to throw it away, I opened it up and didn't find anything wrong with it. After a quick Google Search, turns out Apple fucked up their users (again) and locked this drive to only one laptop : the MacBook Air.

Bellow is the tweak (found online) to make it usable on Linux

# Debian/linux only - Linux SCSI generic driver
sudo apt install sg3-utils -y
//! This is a simple TcpServer example using spawn_link! macro
//!
//! 1) Without Supervisor or AbstractProcess
//! 2) Using Serde passed structs
//! 3) To implement simple linebuffer echo back
//! 4) With ability to listen on multiple local addresses
//!
use lunatic::{net, spawn_link, Mailbox};
use std::io::{BufRead, BufReader, Write};
Category Risk Growth Techdebt Outages Silos Cost
Home Grown ISP 😴 😳 🤠 😇 😎 😋
Ex-Monopoly Telco 🤢 🙏 🤥 💀 🤒 😷
Monopoly Telco 😸 😸 😸 😸 😸 😸