Skip to content

Instantly share code, notes, and snippets.

View eitan07's full-sized avatar

Eitan Schwartz eitan07

  • Israel
  • 18:18 (UTC +03:00)
View GitHub Profile
#[macro_export]
macro_rules! paf {
($s: expr) => {
print!("{}", $s);
std::io::Write::flush(&mut std::io::stdout()).expect("Failed to flush stdout");
};
}
#[derive(Debug)]
@eitan07
eitan07 / client.rs
Created January 7, 2024 19:15
stackoverflowing server
use std::io::{Read, Write};
use std::net::TcpStream;
use log::*;
static MESSAGE: &str = "exit";
fn main() {
log4rs::init_file("resources/log4rs.yml", Default::default()).unwrap();
debug!("log4rs successfully initialized!");
let mut stream = TcpStream::connect("localhost:8010").unwrap();
@eitan07
eitan07 / main.rs
Created December 1, 2023 08:50
code review - main.rs
use crosher::hash_operations;
use std::{
ffi::OsStr,
fs::{self, File},
io::{BufRead, BufReader, Read},
path::Path,
process,
};
fn main() {