Which subreddit?
Which subreddit?
you can use TTS software which would be much easier imo.
Realtek ALC255 is the sound card which isn’t that new. It also gets detected by kernel which I can see in dmesg
output.
Did you put yourself in the group operator?
no, but even when I did put my user into operator group it still doesn’t work.
mixer
command says the volume is 71%.
I think something weird is going on since my sound card isn’t listed of the website but the kernel detects my sound card.
Yes, I tried doing that but it didn’t work. It’s something related to my sound card. FreeBSD detects my sound card but it couldn’t play sound for some reason.
Thank you for telling us this! :)
There is a command called tldr
. it’s works similar to what you have described.
wow, it’s really cool. I have also made an account on gram.social (pixelfed server). so far I am liking it :)
Thank you for the link, now I can read the article.
This website has blocked my country :/
yeah sure! I will make a blog post on Lemmy or somewhere else once I get some free time :)
I have recently made a Pastebin in Rust. I have hosted it on Linode server, It’s not something unique but I really like it since I have made it from scratch.
here is the link: https://paste1.duckdns.org/
it shouldn’t be an issue because I will be running it inside a chroot. I might use UUID
though.
Thank you very much!
wow, now it reduced to only 41 lines of code, that’s nice :D
yeah, you are right, I don’t need mut
. here is the improved version:
use axum::{extract::Path, routing::get, routing::post, Router};
use std::fs::{read_to_string, File};
use std::io::prelude::*;
use std::sync::atomic::{AtomicUsize, Ordering};
const MAX_FILE_SIZE: usize = 1024 * 1024 * 10;
static FILE_COUNT: AtomicUsize = AtomicUsize::new(0);
async fn handle(Path(id): Path<String>) -> String {
match read_to_string(id) {
Ok(content) => content,
Err(e) => e.to_string(),
}
}
async fn submit_handle(bytes: String) -> String {
dbg!(&bytes);
if bytes.len() > MAX_FILE_SIZE {
// Don't store the file if it exceeds max size
return String::from("ERROR: max size exceeded");
}
let path = FILE_COUNT.load(Ordering::Relaxed);
FILE_COUNT.fetch_add(1, Ordering::SeqCst);
let mut output = File::create(path.to_string()).unwrap();
write!(output, "{}", bytes).unwrap();
let mut url = String::from("http://localhost:3000/");
url.push_str(&path.to_string());
return url;
}
#[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();
}
Yeah, I just had to pass numbers
by value instead of reference.
Thank you for the suggestion, I will update the code locally :)
I sometime watch video of The Linux Experiment on this peertube instance: https://tilvids.com/