Eventually I get into producing something I think is useful for others. You'll find random technical knowledge in this Blog so please be patient and use the search function. Some of these software are rather lame and old, the list is ordered by the approximate age (newest first). Unfortunately my older stuff are lost or scattered around my old CDs, not readable anymore 8(.
This is a shell wrapper for the script program from bsdutils that can be used in /etc/passwd as a login shell to log everything an user does.
#!/bin/bash # # spy shell by mcree@tricon.hu # # This is a shell wrapper for the script program from bsdutils # that can be used in /etc/passwd as a login shell to log # everything an user does. # # Protected by the General Public License v2 # export SHELL="/bin/bash" script="/usr/bin/script" mydir="/var/log/spyshell" whoami=`/usr/bin/whoami` date=`/bin/date +%s.%N` mytty=`/bin/ps hTotty | head -n1 | tr '/' '_'` myprefix="$mydir/$whoami/$date.$mytty.$$" mkdir -p "$mydir/$whoami" mycompress() { gzip -9 "$myprefix".* 2>/dev/null exit 0 } trap mycompress 0 if [ "$TERM" = "dumb" ]; then #noninteractive #set > $myprefix.dumb.env #echo "$*" > $myprefix.dumb.params #gzip "$myprefix".* ##strace -f -o $myprefix.strace /bin/bash "$@" exec $SHELL "$@" else #interactive if [ -z "$SPYSHELL" ]; then export SPYSHELL=yes set > $myprefix.env echo "$*" > $myprefix.params $script -f -q -t $myprefix.log 2>$myprefix.timing else #set > $myprefix.dumber.env #echo "$*" > $myprefix.dumber.params #gzip "$myprefix".* exec $SHELL "$@" fi fi
sevenseas-0.1.tar.gz - My first KDevelop project. This is a remake of the old turn based table game, often called „robots” or „tron” with a pirate theme (an idea stolen from astraware). In the you must use the obstacles of the level to kill pirate ships that try follow your every move. The game supports (but not requies) a trivial networked high score server which is not included.
reversi.pas.zip - An old reversi table game clone written in Turbo Pascal. Comments and game controls are in hungarian.
I use this scriptlet to have my digicam files in order.
#!/bin/bash jhead -nf"%Y%m%d_%H%M%S" * jhead -cmd "jpegtran -progressive &i > &o" *.jpg exiftran -ai *.jpg #jhead -cmd "mogrify -quality 90 &i" *.jpg chmod ugo-x *.jpg jhead -ft *.jpg
The following shell script can be used to remove accents from filenames in a directory and all subdirectories.
#!/bin/bash function dodir() { pushd "$1" >> /dev/null for x in *; do trans=`echo "$x" | tr "éáóüűúöóíÉÁÓÜŰÚÖÓÍ" "eaouuuooiEAOUUUOOI" | tr -c "[:alnum:]!@#$%^&_,' ()[].\n-" "#"` if [ "$trans" != "$x" ]; then echo "must rename $x to $trans" mv "$x" "$trans" if [ -d "$trans" ]; then dodir "$trans" fi else if [ -d "$x" ]; then dodir "$x" fi fi done popd >> /dev/null }; dodir "$1"
<< Newer entries | Older entries >>