more cleanups
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
This commit is contained in:
parent
645a10e6fe
commit
844c1b8170
21 changed files with 4 additions and 122 deletions
27
old/bg-image.dellist
Executable file
27
old/bg-image.dellist
Executable file
|
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Nico Schottelius <nico@schottelius.(net|org)>
|
||||
# Date: 30-Jul-2003
|
||||
# Last Modified: -
|
||||
#
|
||||
# generates a random background
|
||||
# use `find imagedir > ~/.bgimages" and then run this script
|
||||
#
|
||||
|
||||
FILE="$HOME/.bgimages"
|
||||
CUR_FILE="$HOME/.bgimages-current"
|
||||
TMP="/tmp/`basename $0`.$USER.$$"
|
||||
IMG="/NONEXISTEN"
|
||||
MAKEBG="wmsetbg -a -b black"
|
||||
|
||||
while [ ! -f "$IMG" -o -z "$IMG" ]; do
|
||||
NUM=`cat $FILE | wc | awk '{ print $1 }'`
|
||||
NUM="$[$NUM+1]" # random uses -1
|
||||
TAKETHIS=`echo $(($RANDOM % $NUM))`
|
||||
IMG=`head -n$TAKETHIS "$FILE" | tail -n1`
|
||||
echo "$IMG" > ~/.bgimages-current
|
||||
cat $FILE | grep -v "^$IMG\$" > $TMP
|
||||
mv $TMP $FILE
|
||||
done
|
||||
|
||||
$MAKEBG $IMG
|
||||
28
old/bw
Executable file
28
old/bw
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
echo ""
|
||||
echo "1) Benni+Mop"
|
||||
echo "2) Mop"
|
||||
echo "3) Benni"
|
||||
echo "4) Other"
|
||||
read -p "Choice: " ch
|
||||
|
||||
case "$ch" in
|
||||
1)
|
||||
xterm -title "***) Telnet: Benni (***" -e telnet benni &
|
||||
xterm -title "***) Telnet: Mop (***" -e telnet mop &
|
||||
;;
|
||||
2)
|
||||
xterm -title "***) Telnet: Mop (***" -e telnet mop &
|
||||
;;
|
||||
|
||||
3)
|
||||
xterm -title "***) Telnet: Benni (***" -e telnet benni &
|
||||
;;
|
||||
4)
|
||||
xterm -title "***) Xterm - Telnet (***" -e telnet &
|
||||
;;
|
||||
*)
|
||||
xterm -title "***) Telnet: Benni (***" -e telnet benni &
|
||||
xterm -title "***) Telnet: Mop (***" -e telnet mop &
|
||||
;;
|
||||
esac
|
||||
3
old/dig2hosttable
Normal file
3
old/dig2hosttable
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#cat $1 | awk '/IN.*A/ { print $1 }' | sed 's/\.$//'
|
||||
cat $1 | awk '/IN.*A/ { print $1 }' | sed 's/\.$//' | sort | uniq
|
||||
|
||||
64
old/gentoo-bug.sh
Executable file
64
old/gentoo-bug.sh
Executable file
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/sh
|
||||
# generate gentoo bug-report
|
||||
# Nico Schottelius <nico-linux-gentoo ... schottelius.org
|
||||
# gentoo-bug.sh
|
||||
#
|
||||
|
||||
REPORTER="Nico Schottelius <nico-linux-gentoo ... schottelius.org>"
|
||||
|
||||
umask 077
|
||||
TMP_BASE=/tmp/`basename $0`-${USER}
|
||||
TMP=${TMP_BASE}-$$
|
||||
|
||||
# read input
|
||||
reread()
|
||||
{
|
||||
_tmp=""
|
||||
name="$1"
|
||||
|
||||
while [ ! "$_tmp" ]; do
|
||||
read -p "$1 [$_tmp]: " _tmp
|
||||
done
|
||||
|
||||
echo $_tmp
|
||||
}
|
||||
|
||||
echo "This makes a small bugreport suitable for developers of the gentoo system."
|
||||
echo "----------------"
|
||||
echo "Please enter information as exact as possible. Thanks."
|
||||
echo ""
|
||||
|
||||
package=`reread package-name`
|
||||
error=`reread "Error occured (short description)"`
|
||||
problem=`reread "Please describe problem in your words"`
|
||||
|
||||
rm -f "$TMP"
|
||||
# make a good filename
|
||||
TMP=${TMP_BASE}-${package}
|
||||
|
||||
# generate file
|
||||
#cat << EOF
|
||||
cat << EOF > "$TMP"
|
||||
--------------------
|
||||
Bug-Reporter for gentoo - http://linux.schottelius.org/scripts/#gentoo-bug.sh
|
||||
--------------------
|
||||
package: $package
|
||||
--------------------
|
||||
reporter: $REPORTER
|
||||
--------------------
|
||||
error: $error
|
||||
--------------------
|
||||
problem-description: $problem
|
||||
--------------------
|
||||
uname-a: `uname -a`
|
||||
--------------------
|
||||
make.conf: `grep -v '^#' /etc/make.conf | grep -v '^$'`
|
||||
--------------------
|
||||
emerge-info: `emerge --info`
|
||||
--------------------
|
||||
other-info:
|
||||
EOF
|
||||
|
||||
echo "If you have additional information, please add them to the report."
|
||||
echo "Now, please mail the resulting file to a gentoo-maintainer/developer:"
|
||||
echo "$TMP"
|
||||
9
old/kopiere_ssh_key
Executable file
9
old/kopiere_ssh_key
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
if [ $# != 1 ]; then
|
||||
echo "`basename $0`: Host"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
host="$1"
|
||||
|
||||
cat ~/.ssh/identity.pub | ssh $host "(mkdir -p ~/.ssh; cat >> ~/.ssh/authorized_keys)"
|
||||
35
old/latex2pdf
Executable file
35
old/latex2pdf
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/sh
|
||||
# Date: 04-04-04 (04-April 2004)
|
||||
# Last Changed: 04-04-04 (04-April 2004)
|
||||
# Author: Nico Schottelius <Nico-linux AT Schottelius DOT Org>
|
||||
# Description: Convert latex to pdf with support for tableofcontents
|
||||
#
|
||||
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo `basename $0`': file(s) (may ommit .tex extension)'
|
||||
echo 'Hey, hey guy, what to convert ?'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for mfile in $@; do
|
||||
|
||||
# .texfile
|
||||
if [ -f "$mfile" ]; then
|
||||
texfile="$mfile"
|
||||
dvifile="${mfile%.tex}"
|
||||
else
|
||||
if [ -f "$mfile".tex ]; then
|
||||
texfile="$mfile".tex
|
||||
dvifile="$mfile"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -z "$texfile" ]; then
|
||||
echo "No such file: $mfile. Skip."
|
||||
break
|
||||
fi
|
||||
|
||||
# use three times (table of contents problem)
|
||||
latex "$texfile" && latex "$texfile" && latex "$texfile" && dvipdfm -p a4 "$dvifile"
|
||||
done
|
||||
23
old/mails_counter
Executable file
23
old/mails_counter
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Author: Nico Schottelius <nicos@pcsystems.de>
|
||||
# Date: 12th of October 2k
|
||||
# Last Modifed: dito
|
||||
# Copyright: GPL 2.0 or newer
|
||||
|
||||
#
|
||||
echo "Starting Netscape Mail counter (c) by Nico Schottelius (nicos@pcsystems.de)"
|
||||
#FILE="/tmp/from.`date +%j`"
|
||||
#rm $FILE 2> /dev/null
|
||||
echo "Please wait, counting mails..."
|
||||
find ~/nsmail -name \* -exec cat {} 2> /dev/null \; | egrep "^From" | grep "@" \
|
||||
| grep -v Nico | less
|
||||
|
||||
#grep From: $FILE.temp | grep -v Drafts | grep -v Sent | grep -v Trash | grep -v telmich | grep -v nicos | grep @ >> $FILE 2> /dev/null
|
||||
#echo "Action: sorting"
|
||||
#sort $FILE -o $FILE.temp
|
||||
#echo "Action: show number of mails"
|
||||
#less $FILE.temp
|
||||
#echo "Action: cleaning up"
|
||||
#rm $FILE $FILE.temp 2>/dev/null
|
||||
echo "Do you have more than 4000 ? :-)"
|
||||
15
old/myfrisk
Executable file
15
old/myfrisk
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
HOST="localhost"
|
||||
|
||||
friskserver &
|
||||
|
||||
# wait some seconds to let friskserver initialize
|
||||
sleep 2
|
||||
|
||||
aiConway $HOST &
|
||||
aiColson $HOST &
|
||||
|
||||
sleep 2;
|
||||
|
||||
xfrisk $HOST &
|
||||
5
old/rootxterm
Executable file
5
old/rootxterm
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
#xterm -fg red -bg black -ls -title r00t -name r00t -bd green -bc -bcf 900 -bcn 750
|
||||
|
||||
title="r00t"
|
||||
|
||||
xterm -fg red -bg black -ls -title $title -name $title -T $title -bd green -bw 8 -bc -bcf 900 -bcn 750 -cr darkgreen +cu +dc -hc green -mesg -s -sb -leftbar -sl 1500 -ulc -u8 -e su -l
|
||||
39
old/slowtar
Executable file
39
old/slowtar
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/bin/bash
|
||||
# Author: Nico Schottelius (nicos@pcsystems.de)
|
||||
# Use: If tar is too fast, we 'll slow it down with dd
|
||||
# Use: In /etc/crontab , "30 6 * * * /root/bin/slowtar", to run backup
|
||||
# ever morning at 6:30
|
||||
# Date: 18th Jan 2000
|
||||
# Last Modified: 18 Jan 2000
|
||||
# Last Modified by:
|
||||
|
||||
##################################### START ####################################
|
||||
###################### Change everthing you need here ##########################
|
||||
##################################### START ####################################
|
||||
|
||||
# To which device backup ?
|
||||
DEV="/dev/st0"
|
||||
|
||||
# What speed to user for the device ?
|
||||
# Use 8k for floppy disk
|
||||
SPEED="1000k"
|
||||
|
||||
# Which Directories should be backuped ?
|
||||
DIRS="/etc"
|
||||
|
||||
# Set the logfile base name ($LOG.err is the error file)
|
||||
LOG="/var/log/backup"
|
||||
|
||||
##################################### STOP #####################################
|
||||
###################### No more changes need under this line ####################
|
||||
##################################### STOP #####################################
|
||||
|
||||
# First display a nice message for the syslog daemon.
|
||||
echo "Starting backup...you can find the log in $LOG"
|
||||
|
||||
#Tar the files and copy them to you device via streamer
|
||||
tar -cvf- -b1000 $DIRS | dd of=$DEV bs=$SPEED >> $LOG 2>> ${LOG}.err
|
||||
|
||||
#Finished & Cleanup
|
||||
echo "Backup done."
|
||||
unset DEV DIRS LOG
|
||||
3
old/strip-squid-logs
Executable file
3
old/strip-squid-logs
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
cat $1 | tr A-Z a-z | egrep -v -e '.gif' -e '.png' -e '.jpg' -e x-javascript | \
|
||||
egrep -v 'schottelius.org' | egrep ' tcp_.*/200 '
|
||||
# | sed s/.jpg$//g | ed s/.png$//g
|
||||
Loading…
Add table
Add a link
Reference in a new issue