I expect MS Windows to support Linux more and more over the years and I'll not be surprised if they'll make moves towards using Linux as the main kernal of Windows some day or even entirely switch to a Linux kernal eventually (only running win32 and and other WinAPI for legacy support). I'm convinced that it would be a viable goal. Their main problems with this decision (other than engineering problems of actually making the switch) would be that other Linux distros might get even better hardware support if hardware manufacuters would create drivers for Linux first and that it might become easier to develop and improve software like Wine, that enables to run old Windows applications on Linux. As for new Windows applications, those would be developed for a fork of Linux anyway.
Entry created on 2021-04-08 Authors: steeph (376) Categories: Computer (78) Linux (36) Microsoft Windows (1) Operating Systems (24) Thoughts (73) Languages used: en (257) edit
SBWG 0.8.6-wip
Entry created on 2021-03-22
Authors: steeph (376)
Categories: Bash (31)
Code (31)
Computer (78)
Linux (36)
Projects (41)
SBWG (18)
Scripts (28)
Software (53)
Languages used: en (257)
Topics: Projects → Code → Bash Scripts → SBWG (16)
edit
By now the initial introduction of SBWG that I've written in the first entry in this category is not only incomplete but in its details largely obsolete. SBWG matured a great deal in the last months and I feel like publishing a new version. I have started documenting stuff properly in the README and other files included in the package since I have a set goal for version 1.0. I will likely add no new features until I have made something that I can satidfyingly call version 1.0. Right now I'm in between versions 0.8.6 and 0.8.7. I call in-between version wip (work in progress). I feel like publishing what I have so far right now. So here is a wip version: 0.8.6-wip.
Bash Dotfiles
Entry created on 2020-11-01 (edited 2021-03-22)
Authors: steeph (376)
Categories: Bash (31)
Code (31)
Computer (78)
Dotfiles (2)
Linux (36)
Scripts (28)
Software (53)
Languages used: en (257)
Topics: Projects (59)
Projects → Code → Bash Scripts (23)
edit
I've finally taken some time to overhaul my dotfiles. I took a lot from git repositories and reddit posts that I've found and added some functions and aliases myself. I'm using Bash 4 and haven't tested any of this with any other shell. I've removed and redacted personal lines.
There are a lot of dotfiles that other's have shared that would be worth sharing here. But it's easy to find those and I don't know what you'd like or not. So I'll point out just one simple project, "Sensible Bash by Mattia Tezzele, that attempts to set saner Bash defaults.
Beep Wars
Entry created on 2021-03-20
Authors: steeph (376)
Categories: Beeping (1)
Code (31)
Computer (78)
Linux (36)
Music (5)
Shared (17)
Star Wars (1)
Languages used: en (257)
Topics: Films (15)
edit
This is one of these things that gets copied around without crediting the author or mentioning any source. Yea, I'm doing it too. I don't know where I got it from anymore.
If you still have a physical pcspeaker, execute this in your Linux shell for some beep music:
beep -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 350 -f 587.32 -D 100 -n -l 250 -f 622.26 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 350 -f 369.99 -D 100 -n -l 250 -f 311.1 -D 100 -n -l 25 -f 466.2 -D 100 -n -l 700 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n -l 25 -f 659.26 -D 100 -n -l 25 -f 622.26 -D 100 -n -l 50 -f 659.26 -D 400 -n -l 25 -f 415.3 -D 200 -n -l 350 -f 554.36 -D 100 -n -l 250 -f 523.25 -D 100 -n -l 25 -f 493.88 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 25 -f 440 -D 100 -n -l 50 -f 466.16 -D 400 -n -l 25 -f 311.13 -D 200 -n -l 350 -f 369.99 -D 100 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 466.16 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 700 -f 587.32 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 392 -D 100 -n -l 25 -f 392 -D 100 -n -l 350 -f 784 -D 100 -n -l 250 -f 739.98 -D 100 -n -l 25 -f 698.46 -D 100 -n -l 25 -f 659.26 -D 100 -n -l 25 -f 622.26 -D 100 -n -l 50 -f 659.26 -D 400 -n -l 25 -f 415.3 -D 200 -n -l 350 -f 554.36 -D 100 -n -l 250 -f 523.25 -D 100 -n -l 25 -f 493.88 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 25 -f 440 -D 100 -n -l 50 -f 466.16 -D 400 -n -l 25 -f 311.13 -D 200 -n -l 350 -f 392 -D 100 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 300 -f 392.00 -D 150 -n -l 250 -f 311.13 -D 100 -n -l 25 -f 466.16 -D 100 -n -l 700 -f 392
I've converted it for FreeBSD:
echo "L15T120MSO4G...G...G...D#..A#G...D#..A#G.....>D...D...D...D#..<A#F#...D#..A#G.....>G...<G..G>G...F#..FED#E.~~~~<G#~>C#...C..<BA#AA#.~~~~D#~F#...D#..GA#...G..A#>D.....G...<G..G>G...F#..FED#E.~~~~<G#~>C#...C..<BA#AA#.~~~~D#~G...D#..A#G.._~D#...A#G....." > /dev/speaker
I'm no musician. I know it's not quite right. But if you ask me, for what it is it's almost good enough. (I think you can tell that I'm not a Star Wars
fan.)
Entry created on 2020-10-07 (edited 2020-12-04) Authors: steeph (376) Categories: Backups (4) Dotfiles (2) Linux (36) Thoughts (73) Languages used: en (257) edit
Theres no feeling like the feeling you get when you finally tidied up your .bashrc, added every alias and function you ever wanted there and then accidently overwrite it with something silly before you made a backup.
Bash One-liners
Entry created on 2020-11-22
Authors: steeph (376)
Categories: Bash (31)
Computer (78)
Linux (36)
Shared (17)
Languages used: en (257)
edit
Great collection of Bash one-liners at https://linuxcommandlibrary.com/basic/oneliners.html
Another, more structured collection at https://github.com/onceupon/Bash-Oneliner
Generate Random Passwords in Linux
Entry created on 2020-09-19 (edited 2020-09-27)
Authors: steeph (376)
Categories: Bash (31)
Code (31)
Computer (78)
Linux (36)
Passwords (1)
Languages used: en (257)
Topics: Projects → Code → Bash Scripts (23)
edit
Two ways to generate random passwords on the command line:
#!/bin/bash
if [ $# -eq 0 ]
then
echo "I'll not generate anything for you if you won't give me at least one argument."
echo "1st argument: password length"
echo "2nd argument: number of passwords (optional)"
exit
fi
i=0
if [ $# -gt 1 ]
then
num=$2
else
num=1
fi
while [ $i -lt $num ]; do
let i=i+1
</dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c$1
echo ""
done
Pass the length of the password as the first argument and the number of passwords as the second argument, if you want more than one.
Or you can use just this line to generate a single 16 character long password with the same rules.
</dev/urandom tr -dc '12345!@#$%qwertQWERTasdfgASDFGzxcvbZXCVB' | head -c16; echo ""
Or just use pwgen (man page) to have more options. It's probably in your distro's repos.
moviefy.sh - Make Bash Output like It's The 80s And We're In Hollywood
Entry created on 2020-09-27
Authors: steeph (376)
Categories: Bash (31)
Code (31)
Computer (78)
Linux (36)
Scripts (28)
Software (53)
Languages used: en (257)
Topics: Projects → Code → Bash Scripts (23)
edit
Source this script in Bash to make unformatted output of commands appear on screen slowly, accompanied by beeping galore.
source moviefy.sh or . moviefy.sh. Every command executed after that will be moviefied. There is no way to turn it off again. (Just exit.) Please note that formatted output may be mangled or it may crash the script. Curses stuff won't work.
#!/bin/bash
export LC_ALL=C
exec > >\
(while IFS= read -d '' -r line; do
if [[ -n $line ]]; then
echo
for (( i=0; i<${#line}; i++ )); do
char="${line:$i:1}"
printf '%c' "$char"
case $char in
[" "]) sleep 0.04
;;
[$'\t']) sleep 0.08
;;
[$'\v']) sleep 0.7
;;
[$'\n'$'\r'$'\f']) sleep 0.25
;;
*) beep -f $(shuf -i 3000-3200 -n 1) -l 5
sleep 0.015
;;
esac
done
printf "${PS1@P}"
printf ""
fi
done)
PROMPT_COMMAND='printf "\0"'