This file contains hidden or 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 = "paper-events" | |
version = "0.1.0" | |
edition = "2021" | |
[dependencies] | |
anyhow = "1" | |
itertools = "0.13" | |
bincode = { version = "2.0.0-rc.3", features = ["derive"] } | |
rand = "0.8" |
This file contains hidden or 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 anyhow::Result; | |
use std::net::SocketAddr; | |
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader}; | |
use tokio::net::{TcpListener, TcpStream}; | |
async fn echo(mut socket: TcpStream, addr: SocketAddr) -> Result<()> { | |
println!("Incoming connection from: {}", addr); | |
let (read, mut write) = socket.split(); | |
let mut read = BufReader::new(read); | |
write.write_all(b"Welcome!").await?; |
This file contains hidden or 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 bitfield_struct::bitfield; | |
#[bitfield(u8)] | |
struct Status { | |
#[bits(4)] | |
tag: u8, | |
#[bits(4)] | |
channel: u8, | |
} |
This file contains hidden or 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
# Place a copy of this config to ~/.aerospace.toml | |
# After that, you can edit ~/.aerospace.toml to your liking | |
# You can use it to add commands that run after login to macOS user session. | |
# 'start-at-login' needs to be 'true' for 'after-login-command' to work | |
# Available commands: https://nikitabobko.github.io/AeroSpace/commands | |
after-login-command = [] | |
# You can use it to add commands that run after AeroSpace startup. | |
# 'after-startup-command' is run after 'after-login-command' |
OlderNewer