Skip to content

Instantly share code, notes, and snippets.

View NickLarsenNZ's full-sized avatar
🦀

Nick NickLarsenNZ

🦀
View GitHub Profile
bind-key D run-shell 'tmux send-keys $(date +%F)'
@NickLarsenNZ
NickLarsenNZ / main.rs
Created June 30, 2024 21:08
Async JoinSet with Semaphores to limit concurrent tasks
use std::{error::Error, sync::Arc, time::Duration};
use tokio::{sync::Semaphore, task::JoinSet};
use tracing_subscriber::fmt::format::FmtSpan;
type Result<T, E = Box<dyn Error>> = std::result::Result<T, E>;
const CONCURRENCY: usize = 2;
#[tokio::main(flavor = "current_thread")]
@NickLarsenNZ
NickLarsenNZ / replicated.nix
Created July 25, 2024 20:38
Replicated CLI for Nix
{ stdenv
, lib
, fetchurl
, installShellFiles
}:
stdenv.mkDerivation rec {
pname = "replicated";
version = "0.78.0";