Entries tagged 'author:steeph' (Page 35)

Film: A.I. Artificial Intelligence Entry created on 2020-10-25 (edited 2020-11-22) Authors: steeph (370) Categories: Artificial Intelligence (2) Films (22) Thoughts (72) Toys (1) Languages used: en (255) Topics: Films (15) edit

There is something that I think most people overlook in the story of the movie A.I. Artificial Intelligence. I've watched it more than three times before I realised this.

I realised that Teddy (the toy robot teddy bear imitating emotions, called a "supertoy") displayed the exact same signs of actual intelligence and emotions as David (the surrogate son A.I. invention). When talking about the movie people discuss whether David is actually intelligent and actually feels emotions like a human or whether he (it?) just imitates them. But nobody seems to notice that the same question then has to be asked about Teddy. The main difference between the two is that one is marketed as a toy and one as an artificial human with actual artificial emotions. When you watch the movie and pay attention to teddy you'll notice that he has opinions of his own, will, shows fear, love, intent, ... On the journey with David he behaves just like any other sentient child character.

I believe the technological improvements of David over Teddy are mainly in looks, texture of the skin, speech synthesis and a repertoire of behavioral patterns that are expected of a boy his age. If you believe that David is sentient and can feel based on what you saw in the movie than you should also believe the same about Teddy.

Comment via email
Bash One-liners Entry created on 2020-11-22 Authors: steeph (370) Categories: Bash (31) Computer (78) Linux (35) Shared (17) Languages used: en (255) 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

Comment via email
Entry created on 2020-05-12 (edited 2020-09-27) Authors: steeph (370) Categories: FireWire (1) Silly (32) Thoughts (72) Languages used: en (255) edit

The choice of available orange FireWire 400 cables is too small in 2020. Why is there no short one?

Comment via email
Generate Random Passwords in Linux Entry created on 2020-09-19 (edited 2020-09-27) Authors: steeph (370) Categories: Bash (31) Code (31) Computer (78) Linux (35) Passwords (1) Languages used: en (255) 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.

Comment via email
moviefy.sh - Make Bash Output like It's The 80s And We're In Hollywood Entry created on 2020-09-27 Authors: steeph (370) Categories: Bash (31) Code (31) Computer (78) Linux (35) Scripts (28) Software (52) Languages used: en (255) 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"'
Comment via email
Fujitsu Cordant Pentium II Aluminium Case Mod Entry created on 2020-03-08 (edited 2020-09-27) Authors: steeph (370) Categories: Case Modding (11) Computer (78) DIY (16) Hardware (16) Projects (41) Languages used: en (255) Topics: Projects → Case Modding (9) edit

I always wanted an aluminium case. A friend gave me this Pentium II he finally decided to get rid of last year. Nice PC, but even nicer in black and with newer hardware in it.

I suck at spray painting and I need to get better paint next time. But if the light comes from the right angle it looks like I imagined it.

I replaced the key lock with a large screw, got rid of the drive cages, replaced the PSU and mainboard, added a graphics card with internally pluggable VGA, replaced the external VGA port with a serial port and added a small LCD panel where the drives used to be, connected internally to the unplugged VGA port. Oh, and green LED strips. I also added two 60 mm fans in the back. I didn't want to cut a whole in any of the other sides, so 60 mm was the largest possible size. Still better than none.

And yes, I actually have a use for a RS232 port.

The main reason I put in the LCD is because I can. I liked the idea ever since I saw a build with a two-line character LCD for status messages around 2004. But nowadays there is a lot more space on the front since optical drives and diskette drives have become rare. So why not make it a regular screen that can be addressed by the OS without much custom code? The idea is to have it display CPU load, temps, notifications and stuff. But I may end up using it mainly for art, animations. I'm not sure, yet.

File Attachments (34 files)
blackalucase-IMG_1082.JPG (image/jpeg, 2235156 B)
blackalucase-IMG_1082.JPG (image/jpeg, 2235156 B)
blackalucase-IMG_1083b.JPG (image/jpeg, 2177437 B)
blackalucase-IMG_1083b.JPG (image/jpeg, 2177437 B)
blackalucase-IMG_1084b.JPG (image/jpeg, 3142205 B)
blackalucase-IMG_1084b.JPG (image/jpeg, 3142205 B)
blackalucase-IMG_1085b.JPG (image/jpeg, 2959783 B)
blackalucase-IMG_1085b.JPG (image/jpeg, 2959783 B)
blackalucase-PXL_20210508_183156593.jpg (image/jpeg, 2037724 B)
blackalucase-PXL_20210508_183156593.jpg (image/jpeg, 2037724 B)
blackalucase-PXL_20210508_183209328.jpg (image/jpeg, 2705989 B)
blackalucase-PXL_20210508_183209328.jpg (image/jpeg, 2705989 B)
blackalucase-PXL_20210509_073811572.jpg (image/jpeg, 2505885 B)
blackalucase-PXL_20210509_073811572.jpg (image/jpeg, 2505885 B)
blackalucase-PXL_20210510_040253140.jpg (image/jpeg, 3253749 B)
blackalucase-PXL_20210510_040253140.jpg (image/jpeg, 3253749 B)
blackalucase-PXL_20210602_163806553.jpg (image/jpeg, 2926498 B)
blackalucase-PXL_20210602_163806553.jpg (image/jpeg, 2926498 B)
blackalucase-_MG_1083.JPG (image/jpeg, 2963638 B)
blackalucase-_MG_1083.JPG (image/jpeg, 2963638 B)
blackalucase-_MG_1086.JPG (image/jpeg, 3330315 B)
blackalucase-_MG_1086.JPG (image/jpeg, 3330315 B)
blackalucase-_MG_1089.JPG (image/jpeg, 4592109 B)
blackalucase-_MG_1089.JPG (image/jpeg, 4592109 B)
blackalucase-_MG_1093.JPG (image/jpeg, 5072351 B)
blackalucase-_MG_1093.JPG (image/jpeg, 5072351 B)
blackalucase-_MG_1094.JPG (image/jpeg, 3363631 B)
blackalucase-_MG_1094.JPG (image/jpeg, 3363631 B)
blackalucase-_MG_1097.JPG (image/jpeg, 4823630 B)
blackalucase-_MG_1097.JPG (image/jpeg, 4823630 B)
blackalucase-_MG_1098.JPG (image/jpeg, 4400245 B)
blackalucase-_MG_1098.JPG (image/jpeg, 4400245 B)
blackalucase-_MG_1104.JPG (image/jpeg, 6064291 B)
blackalucase-_MG_1104.JPG (image/jpeg, 6064291 B)
blackalucase-_MG_1106.JPG (image/jpeg, 4694610 B)
blackalucase-_MG_1106.JPG (image/jpeg, 4694610 B)
blackalucase-_MG_1108.JPG (image/jpeg, 5388781 B)
blackalucase-_MG_1108.JPG (image/jpeg, 5388781 B)
blackalucase-_MG_1113.JPG (image/jpeg, 4482483 B)
blackalucase-_MG_1113.JPG (image/jpeg, 4482483 B)
blackalucase-_MG_1115.JPG (image/jpeg, 3733932 B)
blackalucase-_MG_1115.JPG (image/jpeg, 3733932 B)
blackalucase-_MG_1120.JPG (image/jpeg, 3682694 B)
blackalucase-_MG_1120.JPG (image/jpeg, 3682694 B)
blackalucase-_MG_1130.JPG (image/jpeg, 4821898 B)
blackalucase-_MG_1130.JPG (image/jpeg, 4821898 B)
blackalucase-_MG_1133.JPG (image/jpeg, 1156963 B)
blackalucase-_MG_1133.JPG (image/jpeg, 1156963 B)
blackalucase-_MG_1136.JPG (image/jpeg, 2886411 B)
blackalucase-_MG_1136.JPG (image/jpeg, 2886411 B)
blackalucase-_MG_1143.JPG (image/jpeg, 3382900 B)
blackalucase-_MG_1143.JPG (image/jpeg, 3382900 B)
blackalucase-_MG_1148.JPG (image/jpeg, 3295611 B)
blackalucase-_MG_1148.JPG (image/jpeg, 3295611 B)
blackalucase-_MG_1150.JPG (image/jpeg, 3654553 B)
blackalucase-_MG_1150.JPG (image/jpeg, 3654553 B)
blackalucase-_MG_1151.JPG (image/jpeg, 4074495 B)
blackalucase-_MG_1151.JPG (image/jpeg, 4074495 B)
blackalucase-_MG_1153.JPG (image/jpeg, 3053380 B)
blackalucase-_MG_1153.JPG (image/jpeg, 3053380 B)
blackalucase-_MG_1154.JPG (image/jpeg, 2205086 B)
blackalucase-_MG_1154.JPG (image/jpeg, 2205086 B)
blackalucase-_MG_1159.JPG (image/jpeg, 3127239 B)
blackalucase-_MG_1159.JPG (image/jpeg, 3127239 B)
blackalucase-_MG_1161.JPG (image/jpeg, 2927544 B)
blackalucase-_MG_1161.JPG (image/jpeg, 2927544 B)
blackalucase-beforeafter.jpeg (image/jpeg, 4506606 B)
blackalucase-beforeafter.jpeg (image/jpeg, 4506606 B)
Comment via email
Backup Shell Script Entry created on 2020-09-11 (edited 2020-09-27) Authors: steeph (370) Categories: Backups (4) Bash (31) Code (31) Computer (78) Linux (35) Projects (41) Scripts (28) Software (52) Languages used: en (255) Topics: Projects → Code (26) edit
This entry is an update of the entry 'Automatic backups with rsync under Linux'.
There is a newer version of this entry: 'backup.sh'.

This is an outdated version of my backup script. I've posted a newer version here.


Here is an updated, more versatile version of the simple backup script I posted before. It takes arguments now (wow)! So now you need only one backup.sh and in your cron tab or similar you can pass it the directory you would like to back up.

For example backup.sh /home/user UsersHomeDir will back up the home directory of user to the predefined location.

In preperation you only need to mount the drive you would like to back up to and enter the mount point (or a path inside it) at the top of the script (variable $BUDIR). In this destination folder (which can be an external drive or a NAS) backups are organised in directories named by the host name of the machine the script was executed on and the name of the backup job (the second argument). By default it will keep 8 incremental backups per backup name. This can be changed with the variable $NUM.

If you give the script only one argument it will interpret it as a name of a file that contains the directories that you want to back up.

If you pass no argument to the script it will look for such a file in the location that is pre-defined at the top of the script (variable $LIST).

You can download the script here if you want to.

Comment via email
Automatic backups with rsync under Linux Entry Permalink (edited 2020-09-27) Authors: steeph (370) Categories: Backups (4) Bash (31) Code (31) Computer (78) Linux (35) Projects (41) Scripts (28) Software (52) obsolete (4) Languages used: en (255) Topics: Projects → Code (26) edit
There is a newer version of this entry: 'Backup Shell Script'.

This is a very primitive and bad script. I've posted a new version here.

"No backup no pity!"

I don't agree. But I like the saying for reasons that I shall not analyse here right now.

I don't always have proper backups of my data, let alone off-site backups. I have no backup at all of a large portion of my hoarded data. But I did at some point take the time to create scripts that back up important stuff automatically. Here is a simple one using rsync and a mounted share as a target.


#!/bin/bash

NAME="usershomedir"
SRCDIR="/home/user"
BUDIR="/mnt/backup/"

rm -rf $BUDIR$NAME.8
mv $BUDIR$NAME.7 $BUDIR$NAME.8
mv $BUDIR$NAME.6 $BUDIR$NAME.7
mv $BUDIR$NAME.5 $BUDIR$NAME.6
mv $BUDIR$NAME.4 $BUDIR$NAME.5
mv $BUDIR$NAME.3 $BUDIR$NAME.4
mv $BUDIR$NAME.2 $BUDIR$NAME.3
mv $BUDIR$NAME.1 $BUDIR$NAME.2
cp -al $BUDIR$NAME.0 $BUDIR$NAME.1
NOW=$(date)
echo >> $BUDIR$NAME.log
echo >> $BUDIR$NAME.log
echo >> $BUDIR$NAME.log
echo "##### STARTING INCREMENTAL BACKUP AT $NOW" >> $BUDIR$NAME.log
echo >> $BUDIR$NAME.log
rsync --archive -L --delete $SRCDIR  $BUDIR$NAME.0/ 2>&1 | tee -a $BUDIR$NAME.log

You would create one of these scripts per directory you want to backup. BUDIR is the directory where you want to backup to be stored. This will probably be the same for every script if you have only one backup drive/server. SRCDIR is the directory you want to backup. NAME is the name you want the backup to be stored under. It can be a sub-directory if you want, so you can sort the backups into directories on the target.

Comment via email
Go To Navigation Page
Show/Hide Navigation
Mastodon