soc.octade.net is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.
This server runs the snac software and there is no automatic sign-up process.
𝗕𝗮𝘀𝗵 𝗴𝘂𝗶𝗱𝗲:
https://thewhale.cc/posts/bash-guide
A guide to learn bash: basic operations, basic shell programming, tricks and debugging.
This was invented for #AI. However, I'm finding it really nice for screen readers:
RTK rewrites output from chatty terminal commands that produce a lot of output, often in complex tables, in order to make the output 80 to 90 percent shorter. Just put rtk in front of the command you want to compress. So "rtk git status" instead of "git status". And you can be sure the compacted output is correct because it's just using regular expressions and deterministic rules under the hood to rewrite output from the tools it knows about. If it doesn't know about a particular command, it just passes the output on unchanged.
github.com/rtk-ai/rtk
Now I've got to figure out how to wire this up in #bash so it'll just happen without me typing rtk all the time.#a11y #screenreader #accessibility #commandline
LOL, recursive script and sed = clobbered myself, ha ha. Who needs a malicious AI when you have a defective brain-to-fingers interface? 🤪 #bash
Thinking of introducing DuckDuckGo AI CLI into my minimalist bashcore CLI distros 🐧
I know, adding cloud AI to a sec-focused distro is controversial. But thanks to DDG's proxy, IP addresses are stripped for maximum privacy.
"That's one small step for a dev, one giant leap for CLI-kind"? 🌕🚀
What do my fellow linux friends think about this big step? Worth it?
#SysAdmin #Privacy #AI #CLI #Bash #Distro #Infosec #DevOps #Linux
Here is a "sketch of concept".
I am not satisfied with it, but it may be better than nothing.
(Relying on a DEBUG trap isn't really a good thing here, in my view.)
(1) Example transcript:
$ echo hello
hello
Ready(0); E=0.00 s 10:21:42
$ sleep 1.5
Ready(0); E=1.50 s 10:22:06
$
Ready(0); E=1.50 s 10:22:07
$ false | sleep 3.456
Ready(1 0); E=3.46 s 10:22:47
$
Ready(1 0); E=3.46 s 10:22:50
$ :
Ready(0); E=0.00 s 10:22:55
$
Ready(0); E=0.00 s 10:23:01
(2) Bash source for the above:
### Print the elapsed time for the previous command before each bash prompt.
### Uses a DEBUG trap and the PROMPT_COMMAND variable.
prompt__elapsed_time=""; #Keeping state.
function prompt__print_prompt () {
declare -r s="${PIPESTATUS[*]}";
if [[ "${prompt__elapsed_time}" == "" ]]; then
## The prompt does not change on just pressing Return (no command).
prompt__elapsed_time="$(printf '%s - %s\n' "${EPOCHREALTIME}" "${prompt__start_time}" | bc)";
fi;
## Imitate IBM z/VM's CMS (partly: the latter prints user time and system time):
printf 'Ready(%s); E=%.2f s %s\n' "${s}" "${prompt__elapsed_time}" "$(date +%H:%M:%S)";
}
function prompt__set_time () {
if [[ "${BASH_COMMAND}" != "prompt__print_prompt" ]]; then
prompt__elapsed_time="";
prompt__start_time=${EPOCHREALTIME};
fi;
}
trap prompt__set_time DEBUG;
PROMPT_COMMAND=prompt__print_prompt;
In the #shell #functions I should have written years ago category...
function fedilinktousername {
grep -oE 'https?://[^/]+/@[^/ ]+' |sed -E 's|https?://|@|; s|/@|@|; s/(@[^@]*)(@[^@]*)/\2\1/'
}
function fediusernametolink {
grep -oE '(@[^@ ]+){2}' |sed -E 's|(@[^@ ]+)@([^@ ]+)|https://\2/\1|'
}
rld@Intrepid:~$ clipo
https://polymaths.social/@rl_dane/statuses/01KVJCAG6Y4C1KTGBDBECH2778
rld@Intrepid:~$ clipo |fedilinktousername
@rl_dane@polymaths.social
rld@Intrepid:~$ clipo |fedilinktousername |fediusernametolink
https://polymaths.social/@rl_dane
rld@Intrepid:~$
The mistake you maybe making is that you consider Firefox to be a browser.
A browser doesn't need hundreds and hundreds of Engineers to be maintained, a massive project with multiple use angles and cases does
Firefox does so many (bad) things you can almost consider it a mini operating system
A alpha level Operating System, riddled with security bugs
It's always fantastic to be able to go somewhere in dillo and just have fun, amazing yourself with a speed that pages load
Seriously, why didn't I put this in my ~/.bashrc like... YEARS ago? 😆
year=$( date +%Y)
month=$(date +%m)
day=$( date +%d)
So I DO love me some python, but I just want to say that #Bash is awesome.
I had no idea this was a thing:
echo "${variable/$inTheString/$replacesIt}"