From 327d0401538283d79deec237cc5ecf3d3e132177 Mon Sep 17 00:00:00 2001 From: Caffeine Fueled Date: Wed, 5 Nov 2025 19:29:04 +0000 Subject: [PATCH] Update Usage --- Usage.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/Usage.md b/Usage.md index 8538872..9d72b8d 100644 --- a/Usage.md +++ b/Usage.md @@ -1,3 +1,44 @@ +## Examples for alias in bash + +```bash +## Optional: generate key, replace `mysecretkey` + +openssl rand -hex 32 + +## Upload to linedump + +ldup() { + local dir="${1:-.}" + local key="${2:-mysecretkey}" + tar cz "$dir" \ + | openssl enc -aes-256-cbc -pbkdf2 -salt -base64 -pass pass:"$key" \ + | curl -sS -X POST --data-binary @- https://linedump.com +} + +## Download and extract from linedump in current directory + +lddown() { + local paste_id="$1" + local key="${2:-mysecretkey}" + curl -s "https://linedump.com/${paste_id}" \ + | base64 -d \ + | openssl enc -d -aes-256-cbc -pbkdf2 -pass pass:"$key" \ + | tar xz +} + +## Examples +# key is optional, as it would have been the default + +ldup ./data mysecretkey + +# replace `abc123` with paste_id of the upload + +lddown abc123 mysecretkey + +``` + +--- + ## Transfer directories or binary files **Unencrypted**: