From 5d5b94e6f3e87ac871eadaca27a5d367f7f22a1d Mon Sep 17 00:00:00 2001 From: cscherr Date: Mon, 4 Aug 2025 17:08:54 +0200 Subject: [PATCH] small shell funcs --- .zshrc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.zshrc b/.zshrc index 719321d..099f6a0 100644 --- a/.zshrc +++ b/.zshrc @@ -86,6 +86,17 @@ function condac() { conda activate $@ export HOST=$(hostname) } +function k() +{ + echo -n "$(( $@ ))" +} +function rscript () +{ + TDIR=$(mktemp -d) + rustc -v -C lto -C opt-level=3 $1 -o $TDIR/rscript_executable + $TDIR/rscript_executable ${@:2} + rm -rf $TDIR +} # Call Python and execute multiple statements from args function py() { python <<< "