dmv.community is one of the many independent Mastodon servers you can use to participate in the fediverse.
A small regional Mastodon instance for those in the DC, Maryland, and Virginia areas. Local news, commentary, and conversation.

Administered by:

Server stats:

175
active users

#cli

7 posts7 participants0 posts today

Stupid-but-works tip on how to add inline documentation comments for multi-line shell commands in scripts: Combine command substitution with grave accents "`" and the do-nothing built-in command ":":

```shell
% ls \
> -h `: this is a comment` \
> -a `: this is another comment` \
> -t `: more commentssss`
```

Hey infosec folks 🖤💜
I’m excited to share my project 😅 "Numtap", a CLI calculator that brings quick and reliable math to your terminal—perfect for those moments when you need fast calculations during analysis or scripting!

Why Numtap? 🤔
- An open-source CLI calculator for basic operations (like 2 + 3) and advanced functions (like sin, sqrt) ✅
- Works in two modes: Interactive (for ongoing calculations) 🧮 or Quick ⚡ (for one-off expressions) ✅
- Built with JavaScript using `mathjs` for precision and `chalk` for a colorful interface ✅
- Keeps a history of your calculations 🕒

Get Started 💁
Install Numtap with the command below:

$ npm install -g numtap

Check out the screenshots below to see it in action! For more details, visit the links below.

🔗 Links:
- [GitHub](github.com/AbdeslamChouimet/nu)
- [npm](npmjs.com/package/numtap)

I’d love to hear your feedback 🛠️ and suggestions for improvement! 😊 What do you think 🤔? Do you find CLI tools like this useful in your infosec workflows? 🖤💜

🐘 Mastodon Account Archives 🐘

TL;DR Sometimes mastodon account backup archive downloads fail to download via browser, but will do so via fetch with some flags in the terminal. YMMV.

the following are notes from recent efforts to get around browser errors while downloading an account archive link.

yes, surely most will not encounter this issue, and that's fine. there's no need to add a "works fine for me", so this does not apply to your situation, and that's fine too. however, if one does encounter browser errors (there were several unique ones and I don't feel like finding them in the logs).

moving on... some experimentation with discarding the majority of the URL's dynamic parameters, I have it working on the cli as follows:

» \fetch -4 -A -a -F -R -r --buffer-size=512384 --no-tlsv1 -v ${URL_PRE_QMARK}?X-Amz-Algorithm=AWS4-HMAC-SHA256

the primary download URL (everything before the query initiator "?" has been substituted as ${URL_PRE_QMARK}, and then I only included Amazon's algo params, the rest of the URL (especially including the "expire" tag) seems to be unnecessary.

IIRC the reasoning there is about the CDN's method for defaulting to a computationally inexpensive front-line cache management, where the expire aspects are embedded in the URL instead of internal (to the CDN clusters) metrics lookups for cache expiration.

shorter version: dropping all of the params except the hash algo will initiate a fresh zero-cached hit at the edge, though likely that has been cached on second/non-edge layer due to my incessent requests after giving up on the browser downloads.

increasing the buffer size and forcing ipv4 are helpful for some manner of firewall rules that are on my router side, which may or may not be of benefit to others.

- Archive directory aspect of URL: https://${SERVER}/${MASTO_DIR}/backups/dumps/${TRIPLE_LAYER_SUBDIRS}/original/
- Archive filename: archive-${FILE_DATE}-{SHA384_HASH}.zip

Command:

» \fetch -4 -A -a -F -R -r --buffer-size=512384 --no-tlsv1 -v ${URL_PRE_QMARK}?X-Amz-Algorithm=AWS4-HMAC-SHA256

Verbose output:

resolving server address: ${SERVER}:443
SSL options: 86004850
Peer verification enabled
Using OpenSSL default CA cert file and path
Verify hostname
TLSv1.3 connection established using TLS_AES_256_GCM_SHA384
Certificate subject: /CN=${SEVER}
Certificate issuer: /C=US/O=Let's Encrypt/CN=E5
requesting ${URL_PRE_QMARK}?X-Amz-Algorithm=AWS4-HMAC-SHA256
remote size / mtime: ${FILE_SIZE} / 1742465117
archive-${FILE_DATE}-{SHA384_HASH}.zip 96 MB 2518 kBps 40s

@stefano looks to be working now :)

🔥 Keep your commits consistent!
🔥 forgejo-commit-path-rules v0.2.3 ensures your commit messages align with your file changes.

🧩 Enforce commit message and file path rules in your repo!

🦀 Written in Rust
⭐ Repo: https://codeberg.org/kemitix/forgejo-commit-path-rules
🎬 A ForgeJo Action/CLI Tool

✨ What's New:

- Coloured highlights in logging (supports --no-colour)
- all matching strategy for paths (default is any)
- Built in templates: docs, feature, tests and fixes

🛠 Usage:

- Define rules in .forgejo/commit-path-rules.toml
- Run via CLI or ForgeJo Action

Install:
cargo install forgejo-commit-path-rules

CLI Usage:
forgejo-commit-path-rules --workspace . --no-colour

Forgejo Action:

 jobs:
  validate:
   steps:
    - uses: actions/checkout@v3
      with:
        fetch-depth: 0
    - name: Run forgejo-commit-path-rules
      uses: kemitix/commit-path-rules@v0.2.3
      with:
        args: --verbose
Summary card of repository kemitix/forgejo-commit-path-rules
Forgejo: Beyond coding. We Forge.forgejo-commit-path-rulesEnforce consistency between commit messages and file changes in your repository.