reorganise more old stuff

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
Nico Schottelius 2009-12-28 20:13:28 +01:00
commit c23bfc5a82
54 changed files with 3 additions and 562 deletions

14
old/MOVE-inodes.sh Executable file
View file

@ -0,0 +1,14 @@
for a in `seq 1 9`; do
for b in `seq 1 9`; do
for c in `seq 1 9`; do
for d in `seq 1 9`; do
for e in `seq 1 9`; do
for f in `seq 1 9`; do
mkdir -p $a/$b/$c/$d/$e/$f
mv -f \$Inode$a$b$c$d$e$f* $a/$b/$c/$d/$e/$f 2>/dev/null
done
done
done
done
done
done

3
old/README Normal file
View file

@ -0,0 +1,3 @@
Stuff that is not being used by me (anymore), but may be interesting for others.
-- Nico, 2009-12-28

17
old/add_tele_dns Executable file
View file

@ -0,0 +1,17 @@
FORWARD=/etc/bind/tele.wdt.intern.hosts
REVERSE=/etc/bind/10.10.1.rev
read -p "Name: " name
read -p "Telefonnummer: " tele
read -p "Eintragen (strg+c zum abbrechen) "
if [ "$tele" -le 255 ]; then
echo "$name in A 10.10.1.$tele" >> $FORWARD
echo "$tele in ptr $name.tele.wdt.intern." >> $REVERSE
else
echo "$name bekommt keinen A eintrag, da zu grosse nummer"
fi
echo "$name in TXT \"$tele\"" >> $FORWARD
killall -HUP named

22
old/add_tele_dns.cmd Executable file
View file

@ -0,0 +1,22 @@
if [ $# -ne 2 ]; then
echo noe. $0 name telefon
exit 1
fi
FORWARD=/etc/bind/tele.wdt.intern.hosts
REVERSE=/etc/bind/10.10.1.rev
read -p "Name: " name
read -p "Telefonnummer: " tele
read -p "Eintragen (strg+c zum abbrechen) "
if [ "$tele" -le 255 ]; then
echo "$name in A 10.10.1.$tele" >> $FORWARD
echo "$tele in ptr $name.tele.wdt.intern." >> $REVERSE
else
echo "$name bekommt keinen A eintrag, da zu grosse nummer"
fi
echo "$name in TXT \"$tele\"" >> $FORWARD
killall -HUP named

2
old/alive.sh Normal file
View file

@ -0,0 +1,2 @@
#!/bin/sh
while true; do echo alive..`date +%s` ; sleep 1; done

View file

@ -0,0 +1,3 @@
echo NEWNEW: "$1"
file "$1"
cat "$1"

15
old/check_termine Executable file
View file

@ -0,0 +1,15 @@
#!/bin/sh
#
# Nico Schottelius
# Date: 18-Feb-2003
# Last Modified: 15-September-2003
# displays the things you got todo.
#
CALDIR=~/calendar
cd $CALDIR
for file in *; do
egrep --with-filename -A 2 "^`date +%d.%m:`" "$file"
egrep --with-filename -A 2 "^TO.DO:" "$file"
done

16
old/choose-cvs Executable file
View file

@ -0,0 +1,16 @@
name="CVS"
tmp="/tmp/$name-$$"
alias dialog="dialog"
dialog --menu "$name" 0 0 0 anoncvs@anoncvs.xfree86.org:/cvs xfree-xc \
:pserver:anonymous@mplayerhq.hu:/cvsroot/mplayer mplayer-main 2> $tmp
export CVSROOT=`cat $tmp`
dialog --inputbox "CVS Module" 0 0 2> $tmp
export CVSMODULE=`cat $tmp`
dialog --textbox 0 0 "Checking out $CVSMODULE from $CVSROOT"
bash -c "cvs co $CVSMODULE"

4
old/delphi-remote Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
echo $DISPLAY
ssh -n -X ts "startdelphi"

3
old/german Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
xmodmap ~/.xmodmap-eiche.german

2
old/irctunnel Executable file
View file

@ -0,0 +1,2 @@
ssh -L 6667:irc.freenet.de:6667 -N schottelius.org
ssh -L 6668:irc.schottelius.org:6667 -N schottelius.org

1
old/leds1 Executable file
View file

@ -0,0 +1 @@
while [ true ]; do setleds +num; sleep 1; setleds -num +caps; sleep 1; setleds -caps +scroll; sleep 1; setleds -scroll; sleep 2; setleds +num +caps +scroll; sleep 1; setleds -num -scroll -caps;sleep 1;done

31
old/leds2 Executable file
View file

@ -0,0 +1,31 @@
PROG="setleds"
kbset()
{
if [ $# -ne 2 ]; then return; fi
param=$1
case $2 in
on)
$PROG +$param ;;
off)
$PROG -$param ;;
esac
}
keyb_sequence()
{
kbset num off; kbset caps off; kbset scroll off; sleep 1
kbset num on;kbset scroll on;sleep 1
kbset num off;kbset scroll off;kbset caps on;sleep 1
kbset caps off; kbset num on; sleep 1;
kbset num off; kbset caps on; sleep 1;
kbset caps off; kbset scroll on; sleep 1;
kbset caps on; kbset scroll off; sleep 1;
kbset num on; kbset caps off; sleep 1;
}
while [ true ]; do keyb_sequence; done

3
old/leibniz.ssh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
ssh -o 'ProxyCommand corkscrew 192.168.100.10 3128 %h %p' $@

3
old/mail.netscape Executable file
View file

@ -0,0 +1,3 @@
#!/bin/bash
kppp -c default &
~/bin/Netscape -mail &

11
old/maildruck Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
tempfile=/tmp/blafaselquak
cat > $tempfile
echo -e \\f >> $tempfile
echo "put $tempfile" | smbclient //ps-it-01/lp0 -N -P
rm $tempfile

6
old/monitor-xrandr-aus.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
external="HDMI-2 VGA"
for R in $external; do
xrandr --output $R --off
done

3
old/monitor-xrandr-links.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
xrandr --output VGA --auto
xrandr --output VGA --left-of LVDS

11
old/monitor-xrandr-rechts.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/sh
L=LVDS1
xrandr --output $L --auto
external="VGA1 HDMI1 DP1 HDMI2 DP2 DP3 HDMI-2 VGA"
for R in $external; do
xrandr --output $R --auto --right-of $L
done

9
old/netzscan Executable file
View file

@ -0,0 +1,9 @@
BASE=192.168.0
SMBCLIENT="nmap"
i=0
while [ $i -lt 255 ]; do
$SMBCLIENT "$BASE"."$i"
i=$[$i+1]
done

4
old/new-mail-arrived Executable file
View file

@ -0,0 +1,4 @@
fetchmail &>/dev/null
#ogg123 ~/computer/audio/aol/alle/m00001a2.wav &>/dev/null
ogg123 temp/test.ogg
#ogg123 ~/computer/audio/fun/gotmail.ogg &>/dev/null

14
old/replace-old-files Executable file
View file

@ -0,0 +1,14 @@
FILE=/tmp/replace-`date +%s`
OLD_STRING=/usr/old-files/bin
NEW_STRING=/usr/bin
if [ $# -ne 1 ]; then
echo neo
exit 1
fi
if [ `grep "$OLD_STRING" "$1"` ]; then
echo "$1"
cat "$1" | sed "s,$OLD_STRING,$NEW_STRING,g" > "$FILE"
mv "$FILE" "$1"
fi

3
old/ripaol Executable file
View file

@ -0,0 +1,3 @@
for file in `find /mnt/dvd/ | grep .wav\$`; do
cat $file | oggenc - > `basename $file`
done

8
old/rootX Executable file
View file

@ -0,0 +1,8 @@
#!/bin/sh
ozean="/home/user/nico/bin/ssh/ozean"
eiche="/home/user/nico/bin/ssh/eiche"
xterm -ls -title "Eiche Root" -e "$eiche" &
xterm -ls -title "Ozean Root" -e "$ozean" &

14
old/saver Executable file
View file

@ -0,0 +1,14 @@
#!/bin/sh
case "$1" in
on)
xscreensaver -nosplash &
;;
off)
killall xscreensaver
;;
lock)
xscreensaver -nosplash &
xscreensaver-command -lock &
;;
esac

18
old/spiegel-jans-saug-seite.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
URL=http://www.schaustdu.de/ba/
# test1
# curl http://www.schaustdu.de/ba/ | grep -i -e 'value=' -e 'href=' | sed s'/.*"\(.*\)".*/\1/' | grep -v saugen
# test2
# curl http://www.schaustdu.de/ba/ | grep -i -e 'value=' -e 'href=' | sed -e 's/"//g' -e 's/value=/href=/g' | sed 's/.*href=\(.*\)>.*/\1/' | sed 's/>.*//' | grep -v saugen
# test3 - final
DOCS=`curl http://www.schaustdu.de/ba/ | grep -i -e 'value=' -e 'href=' | sed -e 's/"//g' -e 's/value=/href=/g' | sed 's/.*href=\(.*\)>.*/\1/' | sed 's/>.*//' | grep -v -e saugen -e http -e mailto:`
# go get them!
for doc in $DOCS; do
wget -c ${URL}${doc}
done

33
old/sshto Executable file
View file

@ -0,0 +1,33 @@
#!/bin/sh
# Standard:
thehost="creeper"
theuser="root"
SSH="ssh"
OPTS=""
# HOST
read -p "ssh host [$thehost] :" temphost
if [ -z "$temphost" ]; then
OPTS="$OPTS $thehost"
else
OPTS="$OPTS $temphost"
fi
# USER
read -p "user [$theuser] :" tempuser
if [ -z "$tempuser" ]; then
OPTS="$OPTS -l$theuser"
else
OPTS="$OPTS -l$tempuser"
fi
# COMMAND
read -p "command: " thecmd
if [ -n "$thecmd" ]; then
OPTS="$OPTS \"$thecmd\""
fi
$SSH $OPTS

47
old/sync_data Executable file
View file

@ -0,0 +1,47 @@
#!/bin/sh
#
# Author: Nico Schottelius <nico-linux@schottelius.(org|net)>
# Date: 27-Feb-2003
# Last Modified: 27-Feb-2003
#
if [ $# -ne 2 ]; then
echo rsync '[import|export]' target
exit 1
fi
BACKUP_BASE="/tmp/backup/"
RSYNC="rsync -e ssh -abvz --backup-dir=$BACKUP_BASE --delete"
# source is normally local
case "$2" in
wdt-home)
SRC=~/firmen/wdt/rsync/home/
DEST=fs1:/home/nico/
;;
wdt-doc)
SRC=~/firmen/wdt/rsync/doc/
DEST=fs2:/mnt/data/spezial/edv/doc/
;;
wdt-cgi)
SRC=~/firmen/wdt/rsync/cgi/
DEST=fs1:/usr/local/apache/cgi-bin/ist-werte/
;;
h07-fki)
SRC=~/temp/IMPORTANT_DOCS/linux_tasks/2fpd/decr-f/fake_install/
DEST=telmich@server1.h07.org:public_html/projects/fake-install/
;;
*)
echo "No such target"
exit 1
;;
esac
# normally export
if [ "$1" = "import" ]; then
tmp=$SRC
SRC=$DEST
DEST=$tmp
fi
$RSYNC $SRC $DEST

5
old/taskgreper Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
for proc in $@; do
ps ax|grep $proc|grep -v $0|grep -v "grep $proc"
done

20
old/teecho Executable file
View file

@ -0,0 +1,20 @@
#!/bin/sh
exec 3>/dev/tty
echo2()
{
echo "$@" 1>&2
}
echo3()
{
echo "$@" 1>&3
}
echo1()
{
echo "$@" 1>&1
}
echo2 a b c 2>&1 >/dev/null
echo2 d e f >/dev/null 2>&1
echo2 g h i | tr '[a-z]' '[A-Z]'
( echo2 j k l; echo x y z ) | tr '[a-z]' '[A-Z]'
( echo1 a1 ;echo2 b2; echo3 c3 ) >/dev/null
( echo1 d1 ;echo2 e2; echo3 f3 ) | tr '[a-z]' '[A-Z]'

17
old/test-account Executable file
View file

@ -0,0 +1,17 @@
#!/bin/sh
#
# Nico Schottelius <nico-linux@schottelius.org>
# Date: 21-Oct-2004
# Last Modified: -
#
PROGLIST="wget curl zsh vim irssi perl"
for prog in $PROGLIST; do
[ `which $prog` ] || MISSING="$MISSING $prog"
done
[ "$MISSING" ] || MISSING=" -"
echo "Missing:$MISSING"

3
old/to_gpm Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
cd ~/computer/sources/linux/gpm/cvstree/
screen -q

3
old/to_green Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
. /etc/sys/colors
echo -e $GREEN

7
old/transeterm Executable file
View file

@ -0,0 +1,7 @@
colour="$1"
OPTS="-title `basename $0` -trsb -tr -sh 100 -fg white -bg black -fade 50 -bw 0 +sb -sl 1000 -ls"
[ "$colour" ] && OPTS="$OPTS -tint $colour"
aterm $OPTS

6
old/update-hosts.debian Executable file
View file

@ -0,0 +1,6 @@
hosts="eiche"
for host in $hosts; do
ssh root@$host "apt-get update"
ssh root@$host "apt-get dist-upgrade"
done

1
old/wlanctl-monitor Normal file
View file

@ -0,0 +1 @@
while true; do for i in `seq 1 11`; do wlanctl-ng wlan0 lnxreq_wlansniff enable=true channel=$i; done; done

1
old/wterm_trans Executable file
View file

@ -0,0 +1 @@
wterm -tr -ls -fg white

4
old/xblender Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh
Xwrapper -terminate :0.0 &
export DISPLAY=:0.0
blender &

44
old/xscript Executable file
View file

@ -0,0 +1,44 @@
#!/bin/sh
#
# Author: Nico Schottelius
# Date: Sometime in Summer of 2k
# Last Changed: Wed Dec 13 13:42:45 CET 2000
# Copying: >= GPL 2.0
# Description: This script traces down what X and the
# XTerm are doing. I used that script for finding out, where
# my XTerm reads the LightYellow2 string from :)
#
# used for the xterm
DISPLAY=":0.0"
# What is the name of your X binary ?
X_BIN="XFree86"
# where to write data
X_OUT=/tmp/xerrorn.`whoami`
XTERM_OUT=/tmp/xerrorn-xterm.`whoami`
###############################################################################
# export DISPLAY for the xterm
export DISPLAY=:0.0
# start and trace X.
echo "Starting X"
strace $X_BIN -terminate :0 > $X_OUT 2>&1 &
# start and trace XTerm.
echo "Starting XTerm"
strace xterm > $XTERM_OUT 2>&1 &
# wait some seconds, until XTerm had all time to read all files.
echo "Sleeping some time..."
sleep 15
# ending session. This should be enough data
echo "Stopping tracing..."
killall $X_BIN