home.social

#climagic — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #climagic, aggregated by home.social.

fetched live
  1. 🚀 Wow! One command to save the world from overpriced MCP manuals! 📚 Turns out, we just needed a smartypants to swap a JSON dump for some good ol' CLI magic. Next time, let's try turning water into wine! 🍷🎩✨
    kanyilmaz.me/2026/02/23/cli-vs #saveMCPmanuals #CLImagic #JSONdump #techinnovation #HackerNews #ngated

  2. 🚀 Wow! One command to save the world from overpriced MCP manuals! 📚 Turns out, we just needed a smartypants to swap a JSON dump for some good ol' CLI magic. Next time, let's try turning water into wine! 🍷🎩✨
    kanyilmaz.me/2026/02/23/cli-vs #saveMCPmanuals #CLImagic #JSONdump #techinnovation #HackerNews #ngated

  3. @climagic
    Tired of all these "Yes"-Sayers all the time?:

    ```.bashrc
    no() {yes no}
    maybe() { a=(no yes); while :; do echo "${a[$((RANDOM % 100 < ${1:-50}))]}"; done; }
    ```

    #climagic

  4. #TIL: #xargs has an option -a to read items from a file instead of from standard input. This is perfect if you need to run xargs without a surrounding shell to provide the commonly used pipe mechanism, e.g. calling it just via exec() or similar.

    My case today was with Perl's Test::Command::Simple::run_ok() in pxzgrep's TAP based test suite.

    #linuxcli #cli #climagic #commandlinemagic

  5. #TIL: #xargs has an option -a to read items from a file instead of from standard input. This is perfect if you need to run xargs without a surrounding shell to provide the commonly used pipe mechanism, e.g. calling it just via exec() or similar.

    My case today was with Perl's Test::Command::Simple::run_ok() in pxzgrep's TAP based test suite.

    #linuxcli #cli #climagic #commandlinemagic

  6. #TIL: Filter in #htop (either via pressing F4 or via the commandline option "-F") can't do regular expressions, but the pipe character "|" can be used to separate multiple search terms. E.g. only showing processes which have `systemd` or `sd-pam` in their name works like this:

    htop -F 'systemd|sd-pam'

    #unix #linux #commandline #cli #climagic #tui

  7. #TIL: Filter in #htop (either via pressing F4 or via the commandline option "-F") can't do regular expressions, but the pipe character "|" can be used to separate multiple search terms. E.g. only showing processes which have `systemd` or `sd-pam` in their name works like this:

    htop -F 'systemd|sd-pam'

    #unix #linux #commandline #cli #climagic #tui

  8. (Bash) One liner to create a QR-Code to connect your phone to the Wifi your PC is connected to using nmcli, qrencode and bash...
    sudo bash -c 'CON=$(nmcli -t c s | grep -m 1 '802-11-wireless' | cut -d ":" -f 1) && SSID=$(nmcli -t c s $CON | grep '\.ssid:' | cut -d ":" -f 2) && PSK=$(nmcli -t -s c s $CON | grep '\.psk:' | cut -d ":" -f 2) && echo "SSID=>$SSID< PSK=>$PSK<" && qrencode -t ansiutf8 -s 10 "WIFI:T:WPA2;S:$SSID;H:false;P:$PSK;;"'

    #climagic

    (edit: slightly improved)

  9. CLI makes many things just way more efficient.

    The problem: find all emails sent by any of 60 students since August to make sure I've not forgotten anything agreed. I have email addresses in a text file

    Solution:

    xargs -I M notmuch search date:2023-08-01.. from:M < emails.txt

    Not sure if any of GUI email clients can perform similar operation as easily.

    #cli #cliMagic #linux

  10. CLI makes many things just way more efficient.

    The problem: find all emails sent by any of 60 students since August to make sure I've not forgotten anything agreed. I have email addresses in a text file

    Solution:

    xargs -I M notmuch search date:2023-08-01.. from:M < emails.txt

    Not sure if any of GUI email clients can perform similar operation as easily.

    #cli #cliMagic #linux

  11. Shortest PATH possible. Removes duplicates and merged directories (/bin -> /usr/bin). Don't use if your PATH happens to contain ':'

    export PATH=$(echo $PATH | tr ':' '\n\r' | xargs readlink -f | sort -u | tr '\n\r' ':')

    #climagic #shell #unix

  12. #mastoadmin
    How to get all users from your instance in order to send them a message

    ```
    ❯ curl -H "Authorization: Bearer <Auth Key>" indiehackers.social/api/v1/adm | jq -r ".[].username" | awk '{print}' ORS=',@' | rev | cut -c3- | rev

    ```

    #bash #climagic #bashmagic