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
parent bd2765c540
commit c23bfc5a82
54 changed files with 3 additions and 562 deletions

View File

@ -1,49 +0,0 @@
#!/bin/sh
#
# Nico Schottelius <nico@schottelius.(net|org)>
# Date: 22-Aug-2003
# Last Modified: 29-Apr-2004
# Add mutt hooks and procmail entries at the same time
# Please use a 'DEFAULT' entry in procmailrc to make it work
#
PROCMAILRC=~/.procmailrc
MUTT_MAILBOXES=~/.mutt/mailboxes
MUTT_HEADERS=~/.mutt/hooks
#PROCMAIL_MATCH="^TO" # email after that
PROCMAIL_MATCH="^Delivered-To: " # email after that
echo generating new mutt and new procmailentry
read -p "To Email: " email
read -p "To which folder: " folder
read -p "Your name: " name
read -p "Comment: " comment
read -p "Email=$email, name=$name, comment=$comment and folder=$folder. Enter to continue" bla
# procmail: insert at first line
cat << EOF >> $PROCMAILRC
### autogenerated by add-mutt+procmail-autosort ($comment)
:0
* $PROCMAIL_MATCH$email
$folder/
EOF
# mutt/checking
cat << EOF >> $MUTT_MAILBOXES
### for $email / $name / $comment
mailboxes +$folder/
EOF
# mutt/headers
cat << EOF >> $MUTT_HEADERS
# $comment
folder-hook $folder 'my_hdr From: $name <$email>'
folder-hook $folder 'set from="$email"'
EOF
# folder; {new,cur,tmp} does not work in ash
mkdir -p ~/Maildir/$folder/new
mkdir -p ~/Maildir/$folder/cur
mkdir -p ~/Maildir/$folder/tmp

View File

@ -1,42 +0,0 @@
#!/bin/sh
#
# Nico Schottelius <nico@schottelius.(net|org)>
# Date: 22-Aug-2003
# Last Modified: 17-Jan-2004
# Now adding procmail entries at the beginning of the file
#
PROCMAILRC=~/.procmailrc
MUTT_MAILBOXES=~/.mutt/mailboxes
MUTT_HEADERS=~/.mutt/hooks
echo generating new mutt and new procmailentry
read -p "To Email: " email
read -p "To which folder: " folder
read -p "your name: " name
read -p "Email=$email, name=$name and folder=$folder. Enter to continue" bla
# procmail: insert at first line
cat << EOF >> $PROCMAILRC
### autogenerated by add-mutt+procmail-autosort
:0
* ^TO$email
$folder/
EOF
# mutt/checking
cat << EOF >> $MUTT_MAILBOXES
### for $email / $name
mailboxes +$folder/
EOF
# mutt/headers
cat << EOF >> $MUTT_HEADERS
folder-hook $folder 'my_hdr From: $name <$email>'
folder-hook $folder 'set from="$email"'
EOF
# folder
mkdir -p ~/Maildir/$folder/{new,cur,tmp}

View File

@ -1,56 +0,0 @@
# Date: 15th of March 2k+1
# Last Changed: 11th of January 2k+4
# Author: Nico Schottelius <Nico AT Schottelius DOT Org>
# Description: This script searches for the following strings
# and will substitute them with the right German Characters
#
# _ae_ = ä
# _ue_ = ü
# _oe_ = ö
# _Ae_ = Ä
# _Oe_ = Ö
# _Ue_ = Ü
# _ss_ = ß
#
if [ $# -lt 1 ]; then
echo `basename $0`': file(s)'
echo 'Hey, hey guy, what to convert ?'
exit 1
fi
for mfile in $@; do
if [ ! -f "$mfile" ]; then
echo "Keine Datei namens $mfile gefunden. Skip."
break
fi
cp -f "$mfile" "$mfile".ae_parser-orig
# something other programs do not use
G_STR=".`date +%s%M%U`-`basename $0`-`basename $mfile`-$$"
cat $mfile | sed 's/_ae_/ä/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_ue_/ü/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_oe_/ö/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Ae_/Ä/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Ue_/Ü/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Oe_/Ö/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_ss_/ß/g' > $G_STR
mv $G_STR $mfile
done

View File

@ -1,49 +0,0 @@
# Date: 15th of March 2k+1
# Last Changed: 17th of June 2k+1
# Author: Nico Schottelius <Nico AT Schottelius DOT Org>
# Description: This script searches for the following strings
# and will substitute them with the right German Characters
#
# _ae_ = ä
# _ue_ = ü
# _oe_ = ö
# _Ae_ = Ä
# _Oe_ = Ö
# _Ue_ = Ü
# _ss_ = ß
#
if [ $# -lt 1 ]; then
echo `basename $0`': file(s)'
echo 'Hey, hey guy, what to convert ?'
exit 1
fi
for mfile in $@; do
# something other programs do not use
G_STR=".`date +%s%M%U`-`basename $0`-`basename $mfile`"
cat $mfile | sed 's/_ae_/ä/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_ue_/ü/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_oe_/ö/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Ae_/Ä/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Ue_/Ü/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_Oe_/Ö/g' > $G_STR
mv $G_STR $mfile
cat $mfile | sed 's/_ss_/ß/g' > $G_STR
mv $G_STR $mfile
done

View File

@ -1,9 +0,0 @@
lp=ende
lang=de
searchLoc=0
cmpType=relaxed
relink=on
<input type="hidden" name="sectHdr" value="on">
<input type="hidden" name="spellToler" value="std">
search=

4
fcc
View File

@ -1,4 +0,0 @@
#!/bin/sh
FCCDIR=~/firstclass/opt/firstclass
cd $FCCDIR && ./fcc

View File

@ -1,21 +0,0 @@
#!/bin/sh
#
# Nico Schottelius <nico@schottelius.(net|org)>
# Date: 25-May-2004
# Last Modified:
# Get latest headlines from www.heise.de
#
USERFILE=$HOME/.heise-news
TMP=/tmp/$$-$UID-`date +%s`
# get
curl -s http://www.heise.de | grep '<h3 class="anriss">' | sed 's/.*>\(.*\)<\/a>.*/\1/g' > "$TMP"
if [ ! -f "$USERFILE" ]; then
cat "$TMP"
else
diff -u "$USERFILE" "$TMP" | grep ^+ | grep -v ^+++ | sed 's/^+/Heise News: /g' 2>/dev/null
fi
mv -f "$TMP" "$USERFILE" || rm -f "$TMP"

View File

@ -1,51 +0,0 @@
#!/bin/sh
#
# Nico Schottelius <nico@schottelius.(net|org)>
# Date: 25-May-2004
# Last Modified:
# Get only the latest headlines from different news sites
#
BASE_DIR=~/.get_news
TMP=/tmp/$$-$UID-`date +%s`
if [ $# -ne 1 ]; then
echo "Go away. I want one argument."
exit 666
fi
USERFILE="$BASE_DIR/$1"
case "$1" in
heise)
RDF=http://www.heise.de/newsticker/heise.rdf
BEGIN_NEWS='<title>'
END_NEWS='<\/title>'
NEWS_NAME="heise online news"
;;
pro-linux)
RDF=http://www.heise.de/newsticker/heise.rdf
BEGIN_NEWS='<title>'
END_NEWS='<\/title>'
NEWS_NAME="Pro-Linux News"
;;
*)
"Go away. I don't know anything about $1."
exit 23
esac
SED_STRING='/'"$BEGIN_NEWS"'/{s/'"$BEGIN_NEWS"'//g;s/'"$END_NEWS"'//g;q};d'
echo $SED_STRING
# get
#curl -s "$RDF"
#curl -s "$RDF" | sed "$SED_STRING"
curl -s "$RDF" | grep "$BEGIN_NEWS" | grep -v "$NEWS_NAME" | sed -e "s/$BEGIN_NEWS//g" -e "s/$END_NEWS//g"
#if [ ! -f "$USERFILE" ]; then
# cat "$TMP"
#else
# diff -u "$USERFILE" "$TMP" | grep ^+ | grep -v ^+++ | sed 's/^+/Heise News: /g' 2>/dev/null
#fi
#
###mv -f "$TMP" "$USERFILE" || rm -f "$TMP"

View File

@ -1,49 +0,0 @@
#!/bin/sh
#
# Nico Schottelius <nico@schottelius.(net|org)>
# Date: 25-May-2004
# Last Modified: 27-May-2004
# Get only the latest headlines from different news sites
# Version: 0.3
#
BASE_DIR=~/.get_news
TMP=/tmp/$$-$UID-`date +%s`
if [ $# -ne 1 ]; then
echo "Go away. I want one argument."
exit 666
fi
USERFILE="$BASE_DIR/$1"
case "$1" in
heise)
RDF=http://www.heise.de/newsticker/heise.rdf
BEGIN_NEWS='<title>'
END_NEWS='<\/title>'
NEWS_NAME="heise online news"
;;
pro-linux)
RDF=http://www.pl-forum.de/backend/pro-linux.rdf
BEGIN_NEWS='<title>'
END_NEWS='<\/title>'
NEWS_NAME="Pro-Linux News"
;;
*)
"Go away. I don't know anything about $1."
exit 23
esac
# get
curl -s "$RDF" | grep "$BEGIN_NEWS" | grep -v "$NEWS_NAME" | sed -e "s/$BEGIN_NEWS//g" -e "s/$END_NEWS//g" > "$TMP"
[ -d "$BASE_DIR" ] || mkdir -p "$BASE_DIR"
if [ ! -f "$USERFILE" ]; then
cat "$TMP"
else
diff -u "$USERFILE" "$TMP" | grep ^+ | grep -v ^+++ 2>/dev/null | sed 's/^+//g'
fi
mv -f "$TMP" "$USERFILE" || rm -f "$TMP"

BIN
killm

Binary file not shown.

View File

@ -1,118 +0,0 @@
#!/bin/bash
# Author: Nico Schottelius ( nicos@pcsystems.de )
# Last Modified by:
# Date: 20th of January 2000
# Last Changed: 20th of January
# Description: Skript which does mapping and reverse
#
# My variables :-)
host=""
ip=""
choice="y"
class=""
domain="mignet.magrathea.de"
# Title
echo "## Neuer Nameserver-Eintrag ##"
read -p "Bitte Domain eingeben ($domain) : " domain
# Check if zero domain
if [ -z "$domain" ]; then domain="mignet.magrathea.de";fi
# Main loop for more than one host in a domain
while [ "$choice" = "y" -o "$choice" = "Y" ]
do
read -p "Hostname tippen: " host
read -p "IP klopfen: " ip
read -p "NetClass eingeben: (a,b,c): " class
echo -n "Uno momento..."
# The real program
# First mapping
if [ -e /var/named/$domain ];
then
echo "$host IN A $ip" >> /var/named/$domain
else
cat << EOF >> /etc/named.conf
zone "$domain" in {
type master;
file "$domain";
};
EOF
cat /var/named/sample/domain > /var/named/$domain
echo "$host IN A $ip" >> /var/named/$domain
fi
echo -n "."
# Lookup the host and net id, to choose the right arpa file
# For A it is net=172 host=16.1.1
if [ $class = a -o $class = A ];
then
# Get the arpa file
net=`echo $ip | cut -d. -f1`
# Get the hostid.
ho=`echo $ip |cut -d. -f2-4`
# The reverse Net
rnet=$net
# For B it is net=172.16 host=1.1
elif [ $class = b -o $class = B ];
then
# Get the arpa file
net=`echo $ip | cut -d. -f1-2`
# Get the hostid.
ho=`echo $ip | cut -d. -f3-4`
# The reverse Net
rnet1=`echo $ip | cut -d. -f1`
rnet2=`echo $ip | cut -d. -f2`
rnet="$rnet2.$rnet1"
# For C it is net=172.16.1 host=1
elif [ $class = c -o $class = C ];
then
# Get the arpa file
net=`echo $ip | cut -d. -f1-3`
# Get the hostid.
ho=`echo $ip | cut -d. -f4`
# The reverse Net
rnet1=`echo $ip | cut -d. -f1`
rnet2=`echo $ip | cut -d. -f2`
rnet3=`echo $ip | cut -d. -f3`
rnet="$rnet3.$rnet2.$rnet1"
fi
echo -n "."
if [ -e /var/named/reverse/$net ];
then
echo "$ho IN PTR $host.$domain." >> /var/named/reverse/$net
else
cat << EOF >> /etc/named.conf
zone "${rnet}.in-addr.arpa" in {
type master;
file "reverse/$net";
};
EOF
cat /var/named/sample/reverse > /var/named/reverse/$net
echo "$ho IN PTR $host.$domain." >> /var/named/reverse/$net
fi
echo -n "."
echo 'Finito :-)'
read -p "Noch einen Host in $domain eintragen ? " choice
done

View File

@ -1,101 +0,0 @@
#!/usr/bin/perl
#
# Nico Schottelius <nico@schottelius.(net|org)>
# Date: 22-Sep-2003
# Last Modified: 26-Sep-2003
#
# some code stolen from mbox2maildir by Bruce Guenter <bruceg@em.ca>,
# which based on mbox2maildir by Russell Nelson <nelson@qmail.org>
# first this was a shellscript, now it's a perlscript
require 'stat.pl';
use File::Find;
# this is where all the mails goto
MAILDIR_BASE=/home/user/nico/Maildir/nsmail
for spool in $@; do
i=0
MAILDIR=$MAILDIR_BASE/`basename $spool`-$i;
MAIL=$spool
mkdir -p $MAILDIR/{new,cur,tmp}
if [ ! -d "$MAIL" -a -f "$MAIL" ]; then
echo Settings: $MAILDIR - $MAIL
echo mbox2maildir-test "$MAIL" "$MAILDIR"
read -p "converted $spool"
fi
$i++;
done
sub error {
print STDERR join("\n", @_), "\n";
exit(1);
}
sub usage {
print STDERR "usage: nsmail2maildir <nsmaildirfile> <destinationdir>\n";
exit(@_);
}
# check args
&usage(1) if $#ARGV != 2;
$mbox = $ARGV[0];
$ddir = $ARGV[1];
&error("can't open mbox '$mbox'") unless
open(SPOOL, $mbox);
-d $ddir || mkdir $ddir,0700 ||
&error("destinationdir '$mdir' doesn't exist and can't be created.");
-d $ddir || mkdir $ddir,0700 ||
&error("destinationdir '$mdir' doesn't exist and can't be created.");
chown($uid,$gid,$mdir) if defined($uid) && defined($gid);
chdir($mdir) || &error("fatal: unable to chdir to $mdir.");
-d "tmp" || mkdir("tmp",0700) || &error("unable to make tmp/ subdir");
-d "new" || mkdir("new",0700) || &error("unable to make new/ subdir");
-d "cur" || mkdir("cur",0700) || &error("unable to make cur/ subdir");
chown($uid,$gid,"tmp","new","cur") if defined($uid) && defined($gid);
$stamp = time;
sub open_msg {
my($flags,$header) = @_;
if($flags) {
if($flags =~ /RO/) { $fn = "cur/$stamp.$$.mbox:2,S"; }
elsif($flags =~ /O/) { $fn = "cur/$stamp.$$.mbox"; }
else { $fn = "new/$stamp.$$.mbox"; }
} else {
$fn = "new/$stamp.$$.mbox";
}
$stamp++;
close(OUT);
open(OUT, ">$fn") || &error("unable to create new message");
chown ($uid,$gid,$fn) if defined($uid) && defined($gid);
print OUT @$header, "\n";
}
$in_header = 0;
while(<SPOOL>) {
if(/^From /) {
open_msg($flags, \@header) if $in_header;
undef $flags;
undef @header;
$in_header = 1;
push @header, "MBOX-Line: $_";
} elsif($in_header) {
if(/^\s+$/o) {
$in_header = 0;
open_msg($flags, \@header);
} else {
$flags = $1 if /^Status:\s+(\S+)/oi;
push @header, $_;
}
} else {
s/^>From /From /;
print OUT || &error("unable to write to new message");
}
}
close(SPOOL);
open_msg($flags, \@header) if $in_header;
close(OUT);

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

View File

View File

View File

View File

View File

View File

View File

View File

View File

6
sc
View File

@ -1,6 +0,0 @@
export PS1=":: uchu :: "
export PS2=""
export PS3=""
export PROMPT_COMMAND=""
cd /home/server/samba/transfer/viri
clear

View File

@ -1,2 +0,0 @@
#!/bin/sh
#echo "/usr/local/bin/irssi -c localhost" | ssh schottelius.org -lnico

View File

@ -1,5 +0,0 @@
#ifconfig wlan0 up
cd ~nico/temp/sniff
kismet_monitor
kismet_server
kismet_curses