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 std::f64; | |
use std::u8; | |
#[allow(dead_code)] | |
fn print_gnostr() { | |
let s = "gnostr"; | |
for byte in s.as_bytes() { | |
print!("{:02X} ", byte); | |
} |
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
set shell := ["sh", "-c"] | |
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"] | |
set allow-duplicate-recipes | |
set positional-arguments | |
set dotenv-load | |
set export | |
alias tmp := tmpdir | |
bt := '0' |
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
// Cargo.toml | |
// [package] | |
// name = "crossterm-lifecycle" | |
// version = "0.1.0" | |
// edition = "2021" | |
// | |
// [dependencies] | |
// tokio = { version = "1.44.0", features = ["full"] } | |
// ratatui = "0.26" | |
// crossterm = "0.27" |
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
// Cargo.toml | |
// [package] | |
// name = "crossterm-lifecycle" | |
// version = "0.1.0" | |
// edition = "2021" | |
// | |
// [dependencies] | |
// tokio = { version = "1.44.0", features = ["full"] } | |
// ratatui = "0.26" | |
// crossterm = "0.27" |
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
// Cargo.toml | |
// [package] | |
// name = "crossterm-lifecycle" | |
// version = "0.1.0" | |
// edition = "2021" | |
// | |
// [dependencies] | |
// tokio = { version = "1.44.0", features = ["full"] } | |
// ratatui = "0.26" | |
// crossterm = "0.27" |
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
// Cargo.toml | |
// [package] | |
// name = "crossterm-lifecycle" | |
// version = "0.1.0" | |
// edition = "2021" | |
// | |
// [dependencies] | |
// tokio = { version = "1.44.0", features = ["full"] } | |
// ratatui = "0.26" | |
// crossterm = "0.27" |
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
// Cargo.toml | |
// [package] | |
// name = "crossterm-lifecycle" | |
// version = "0.1.0" | |
// edition = "2021" | |
// | |
// [dependencies] | |
// tokio = { version = "1.44.0", features = ["full"] } | |
// ratatui = "0.26" | |
// crossterm = "0.27" |
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
// Cargo.toml | |
// [package] | |
// name = "tokio_async_command" | |
// version = "0.1.0" | |
// edition = "2021" | |
// | |
// [dependencies] | |
// tokio = { version = "1.44.0", features = ["full"] } | |
use tokio::io::{AsyncBufReadExt, BufReader}; |
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 std::env; | |
fn main() { | |
let mut args: Vec<String> = env::args().collect(); | |
let mut verbose_count = 0; | |
let mut output_count = 0; | |
let mut output_files: Vec<String> = Vec::new(); | |
// Simulating command-line arguments (for testing) | |
args.push("-v".to_string()); |
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 std::env; | |
fn main() { | |
let mut args: Vec<String> = env::args().collect(); | |
let mut verbose = false; | |
let mut output_file: Option<String> = None; | |
args.push("-v".to_string()); | |
args.push("-o".to_string()); | |
args.push("test.txt".to_string()); | |
let mut i = 1; // Start from 1 to skip the executable path |