I was curious so I tried to register with a Proton Pass alias which is @passmail.net and they also refuse those. I think they are afraid of services which allow to easily create multiple aliases, because people could create multiple accounts very easily (scammers maybe)? It’s a dumb rationale because it’s not much harder to create many Gmail accounts but that’s the only reason I can think of.
- 0 Posts
- 15 Comments
beeb@lemm.eeto
3DPrinting@lemmy.world•The magnetic printing plate shifted early in the print - or something else happened?English
0·2 years agoUsually only one axis skips steps, especially since the MK4 has collision detection. A shift in both axes would rather indicate a steel sheet shift imo
beeb@lemm.eeto
3DPrinting@lemmy.world•Trouble keeping a top-heavy TPE part on the bedEnglish
0·2 years agoFantastic! Glad you got it in the end
beeb@lemm.eeto
3DPrinting@lemmy.world•Trouble keeping a top-heavy TPE part on the bedEnglish
0·2 years agoDid you losen the idler tension screws? TPE requires that the tension is very very light otherwise it tends to buckle around the gear before entering the nozzle tube. Reducing retractions to a minimum is also always a good idea, as well as limiting the max flow rate.
beeb@lemm.eeto
Rust@programming.dev•Autopublish assets to the github release section with cargo publish
0·2 years agoCargo dist! Here’s a nice workflow you can use : https://blog.orhun.dev/automated-rust-releases/
beeb@lemm.eeto
Technology@lemmy.world•Handful of users claim new Nvidia GPUs are melting power cables againEnglish
0·2 years agoA handful? Wow that’s gotta be like 50% of the 50 series out there!
beeb@lemm.eeto
Technology@lemmy.world•Has Github/Microsoft rolled back the master to main switch?English
0·2 years agoI prefer main simply because it faster to type. I propose main branches be renamed to “m”
It’s like vim but with lsp support out of the box and the keybindings make sense
What is driving the bed height? Lead screws? Check if they are straight and/or wobble around as they turn. Any imprecision in bed height due to mechanical issues with the Z axis would also translate into perimeter width variations.
Note that there are many security concerns with this, notably the fact that there is no input validation on the
idpath segment which means you can get the content of any file (e.g.http://localhost:3000/src%2Fmain.rs). It’s also very easy to scrape the content of all the files because the IDs are easy to predict. When the server reboots, you will overwrite previously written files because the counter starts back at zero. Using aUUIDwould probably mostly solve both these issues.
Here’s a slightly more idiomatic version:
use std::{ fs, sync::atomic::{AtomicUsize, Ordering}, }; use axum::{extract::Path, http::StatusCode, routing::get, routing::post, Router}; const MAX_FILE_SIZE: usize = 1024 * 1024 * 10; static FILE_COUNT: AtomicUsize = AtomicUsize::new(0); async fn handle(Path(id): Path<String>) -> (StatusCode, String) { match fs::read_to_string(id) { Ok(content) => (StatusCode::OK, content), Err(e) => (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()), } } async fn submit_handle(bytes: String) -> (StatusCode, String) { dbg!(&bytes); if bytes.len() > MAX_FILE_SIZE { // Don't store the file if it exceeds max size return ( StatusCode::BAD_REQUEST, "ERROR: max size exceeded".to_string(), ); } let path = FILE_COUNT.fetch_add(1, Ordering::SeqCst); if let Err(e) = fs::write(path.to_string(), bytes) { return (StatusCode::INTERNAL_SERVER_ERROR, e.to_string()); } (StatusCode::CREATED, format!("http://localhost:3000/%7Bpath%7D")) } #[tokio::main] async fn main() { let app = Router::new() .route("/", get(|| async { "Paste something in pastebin! use curl -X POST http://localhost:3000/submit -d 'this is some data'" })) .route("/{id}", get(handle)) .route("/submit", post(submit_handle)); let listener = tokio::net::TcpListener::bind("127.0.0.1:3000") .await .unwrap(); axum::serve(listener, app).await.unwrap(); }Note that there are no
unwrapin the handlers which would absolutely want to avoid (it would crash your server). The endpoints now also return the correct HTTP code for each case. Some minor changes regarding creating the string values (use offormat!andto_string()on string slices). Lemmy messes with the curly braces in theformat!macro, there should be curly braces around thepathvariable name.
Fetch add will return the old value before updating it so you don’t need the “.load” call above it!
I will probably post an improved version (if you like) but the main point is that you do not need the atomic to be mut, and so you don’t need unsafe. Have a look at https://doc.rust-lang.org/std/sync/atomic/struct.AtomicUsize.html#method.fetch_add too
Did you check out the Examples ?


Maybe you’re using light roasted coffee, which usually requires a higher quality grinder to extract properly. You could switch to something darker which for sure will reduce the acidity levels, or get a cheap quality hand grinder. I’ve had a 1zpresso for a while which does the job, but I finally got a good electric one too because it’s only fun for a few weeks to grind by hand for espresso (it takes like 45 seconds)