Major update (yes, longtimenocommit message)
This commit is contained in:
parent
68266e89b0
commit
256dc98754
24 changed files with 127 additions and 77 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -2,3 +2,5 @@ schwanz3*sh
|
|||
.mac-adresses-csv-to-dhcpd.sh.swp
|
||||
.*.swp
|
||||
sut
|
||||
ctt
|
||||
consul
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
#!/bin/sh
|
||||
|
||||
touch "$0"
|
||||
date > ~/.last-backup
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
notmuch search --output=files --format=text0 tag:spam or tag:deleted | xargs -0 --no-run-if-empty rm
|
||||
notmuch new --quiet
|
||||
notmuch new --quiet 2>/dev/null
|
||||
|
|
|
|||
|
|
@ -34,8 +34,8 @@ our $LOCALHOST_ONLY = 1;
|
|||
# Configure the program that you want to run to handle the requests.
|
||||
# This editor invocation must NOT return control to this script until
|
||||
# you are done editing.
|
||||
our $EDITOR_CMD = '/home/users/nico/bin/vim-term "%s"';
|
||||
#our $EDITOR_CMD = '/usr/bin/emacsclient -c "%s"';
|
||||
#our $EDITOR_CMD = '/home/users/nico/bin/vim-term "%s"';
|
||||
our $EDITOR_CMD = '/usr/bin/emacsclient -c "%s"';
|
||||
|
||||
# The settings to configure the temp dir and how soon old files are removed.
|
||||
# If TMPTEMPLATE contains the string -URL64-, then up to 64 chars of the munged
|
||||
|
|
|
|||
|
|
@ -4,10 +4,12 @@
|
|||
|
||||
set -e
|
||||
|
||||
text=${1:-cdist}
|
||||
|
||||
#cd /usr/figle*/share/figlet/
|
||||
cd /usr/share/figlet
|
||||
cd /usr/share/figlet/fonts/
|
||||
#for a in *.flf; do BLA=${a%.flf}; echo $BLA; echo hallo | figlet -f $BLA; done
|
||||
#for a in *.flf; do BLA=${a%.flf}; echo $BLA; echo CM Bofs | figlet -f $BLA; done
|
||||
#for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo $BLA | figlet -f $BLA; done
|
||||
for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo cdist | figlet -f $BLA; done
|
||||
for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo $text | figlet -f $BLA; done
|
||||
|
|
|
|||
34
hole_mails
34
hole_mails
|
|
@ -1,16 +1,26 @@
|
|||
#!/bin/sh
|
||||
|
||||
SLEEP=$1
|
||||
securemail
|
||||
fetchmail
|
||||
|
||||
if [ -z "$SLEEP" ]; then
|
||||
echo "$0 Zeit zum Schlafen"
|
||||
exit 1
|
||||
fi
|
||||
# Disabled by Mon Jun 20 10:56:19 CEST 2016 -- using mu now
|
||||
# notmuch new
|
||||
|
||||
while true; do
|
||||
fetchmail >/dev/null
|
||||
offlineimap
|
||||
fetchmail >/dev/null
|
||||
echo "Mails abgeholt, schlafe nun $SLEEP Sekunde(n)"
|
||||
sleep $SLEEP;
|
||||
done
|
||||
# offlineimap
|
||||
# notmuch new
|
||||
|
||||
exit 0
|
||||
|
||||
cd ~/Maildir
|
||||
git add .
|
||||
git commit --quiet -m "Update from $(hostname) $(date +%F-%H:%M)"
|
||||
#git fetch --quiet origin
|
||||
git fetch origin
|
||||
|
||||
git merge -m "Merge from VM" origin/from-vm
|
||||
|
||||
git push --quiet origin master:from-notebook
|
||||
|
||||
notmuch new --quiet
|
||||
|
||||
exit 0
|
||||
|
|
|
|||
4
lh
4
lh
|
|
@ -6,4 +6,6 @@ datef="$2"
|
|||
file=$(date +%Y-%m-%d $datef)
|
||||
|
||||
set -x
|
||||
$EDITOR "${file}${suffix}"
|
||||
|
||||
# $EDITOR "${file}${suffix}"
|
||||
emacs "${file}${suffix}"
|
||||
|
|
|
|||
11
lock-screen
11
lock-screen
|
|
@ -1,5 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
i3lock -c fe0000 -d
|
||||
# i3lock -c fe0000 -d
|
||||
|
||||
#~/b/i3lock/i3lock -t -i /home/users/nico/oeffentlich/bilder/linux-tux-bsd/think_linux_kachel.png
|
||||
# sleep 2
|
||||
# xset dpms force off
|
||||
|
||||
# i3lock -i ~/.background.png --dpms --nofork
|
||||
|
||||
# try to start - if it already runs it will just exit
|
||||
xscreensaver &
|
||||
|
||||
xscreensaver-command -lock
|
||||
|
|
|
|||
19
mailstats
19
mailstats
|
|
@ -2,11 +2,24 @@
|
|||
# Nico Schottelius, Tue Dec 3 23:16:30 CET 2013
|
||||
# Show mailstats
|
||||
|
||||
#notmuch count tag:inbox or tag:unread
|
||||
(
|
||||
for dir in ~/Maildir ~/Maildir/firmen/ungleich \
|
||||
~/Maildir/firmen/ungleich/panter \
|
||||
~/Maildir/firmen/ungleich/entwine; do
|
||||
~/Maildir/firmen/ungleich/technik/INBOX/panter \
|
||||
~/Maildir/firmen/ungleich/technik/INBOX/teralytics \
|
||||
~/Maildir/bildung/zhaw \
|
||||
~/Maildir/firmen/ungleich/technik/INBOX/entwine; do
|
||||
|
||||
find $dir/cur $dir/new -type f
|
||||
#find $dir/cur $dir/new -type f
|
||||
find $dir/new -type f
|
||||
done
|
||||
) | wc -l
|
||||
|
||||
echo --
|
||||
notmuch count tag:inbox
|
||||
notmuch count tag:inbox and NOT tag:archive
|
||||
echo --
|
||||
notmuch count tag:inbox and tag:unread
|
||||
notmuch count tag:inbox and tag:new
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,5 +4,6 @@ i3status | while :
|
|||
do
|
||||
read line
|
||||
sut=$(sut)
|
||||
echo "$sut | $line" || exit 1
|
||||
korea=$(TZ='Asia/Seoul' date "+%F %H:%M %Z")
|
||||
echo "$korea | $sut | $line" || exit 1
|
||||
done
|
||||
|
|
|
|||
2
mympd
2
mympd
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd ~/oeffentlich/audio
|
||||
cd ~/vcs/annex/audio
|
||||
mpd --no-daemon ./mpd.conf
|
||||
|
||||
|
|
|
|||
6
nz
6
nz
|
|
@ -1,4 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
# exec > /tmp/nz
|
||||
# exec 2>&1
|
||||
|
||||
set -x
|
||||
|
||||
ddir="${HOME}/vcs/notes"
|
||||
|
||||
cd "$ddir"
|
||||
|
|
|
|||
2
ruagdesktop
Normal file → Executable file
2
ruagdesktop
Normal file → Executable file
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
xrandr --output DP2 --above eDP1 --auto
|
||||
xrandr --output HDMI1 --left-of DP2 --auto --rotate left
|
||||
xrandr --output HDMI1 --right-of DP2 --auto --rotate left
|
||||
|
||||
#i3 workspace 5
|
||||
#i3 move workspace to output right
|
||||
|
|
|
|||
|
|
@ -6,5 +6,4 @@
|
|||
#==============================================================================
|
||||
|
||||
echo '[ "$TERM" = "rxvt-unicode" ] && export TERM=rxvt' >> "$HOME/.profile"
|
||||
echo '[ "$TERM" = "rxvt-unicode" ] && export TERM=rxvt' >> "$HOME/.bash_profile"
|
||||
echo 'if ( $TERM == rxvt-unicode ) setenv TERM rxvt' >> "$HOME/.cshrc"
|
||||
|
|
|
|||
27
securemail
27
securemail
|
|
@ -5,6 +5,8 @@
|
|||
# used at conferences / congresses / meetings
|
||||
#
|
||||
|
||||
$HOME/bin/securemail.off
|
||||
|
||||
POP3=110
|
||||
POP3S=995
|
||||
IMAP=143
|
||||
|
|
@ -19,22 +21,33 @@ HOST="213.146.113.242"
|
|||
HOST="nico@62.65.138.78"
|
||||
HOST="home.schottelius.org"
|
||||
HOST="nico@77.109.138.222"
|
||||
# HOST="root@backup1.ungleich.ch"
|
||||
#HOST="ssh.schottelius.org"
|
||||
HOST="root@wein.ungleich.ch"
|
||||
HOST="root@kaffee.ungleich.ch"
|
||||
HOST="root@mx.ungleich.ch"
|
||||
HOST="oneadmin@kaffee.ungleich.ch"
|
||||
HOST="root@mx-hetzner01.ungleich.ch"
|
||||
HOST="root@mx.ungleich.ch"
|
||||
|
||||
if [ $# -ge 1 ]; then
|
||||
HOST=$1; shift
|
||||
fi
|
||||
#-L2323:mx3.schottelius.org:$IMAPS \
|
||||
#-L4241:mx3.schottelius.org:$SMTP \
|
||||
|
||||
#ssh -T -f -C -N \
|
||||
# -L4241:mx.ungleich.ch:$SMTP \
|
||||
# -R :4242:localhost:22 \
|
||||
# -D 3128 "$@" \
|
||||
# "$HOST" && sendmail -q
|
||||
#
|
||||
ssh -T -f -C -N \
|
||||
-L2323:77.109.138.221:$IMAPS \
|
||||
-L4241:77.109.138.221:$SMTP \
|
||||
-L2323:mx.ungleich.ch:$IMAPS \
|
||||
-L4241:mx.ungleich.ch:$SMTP \
|
||||
-L2324:imap.googlemail.com:$IMAPS \
|
||||
-L2325:mail.zhaw.ch:$IMAPS \
|
||||
-L2326:imap.googlemail.com:$POP3S \
|
||||
-R :4242:localhost:22 \
|
||||
-D 12345 \
|
||||
"$HOST" "$@"
|
||||
-D 3128 "$@" \
|
||||
"$HOST" && sendmail -q
|
||||
|
||||
# Fernzugriff
|
||||
# ssh -T -f -C -N -R4242:localhost:22 "$HOST"
|
||||
|
|
|
|||
|
|
@ -25,5 +25,5 @@ for arg in "$@"; do
|
|||
grep_param="${grep_param} -e ^${arg}:"
|
||||
done
|
||||
|
||||
# set -x
|
||||
set -x
|
||||
find "$CALDIR" -type f -exec egrep --with-filename -A 2 $grep_param {} \;
|
||||
|
|
|
|||
|
|
@ -16,10 +16,7 @@ dst=$1; shift
|
|||
|
||||
case $from in
|
||||
loch)
|
||||
src=root@loch:/home/services/backup/bento-manuell/
|
||||
;;
|
||||
42)
|
||||
src=root@42:/home/services/backup/bento/
|
||||
src=root@loch:/home/services/backup/notebook-manuell/home/users/nico/
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
@ -30,6 +27,7 @@ sshconfig=$sshdir/config
|
|||
|
||||
d1=$(date)
|
||||
set -x
|
||||
rsync -avS -e "ssh -i $sshkey -F $sshconfig" --delete "$src" "$dst"
|
||||
#rsync -avS -e "ssh -i $sshkey -F $sshconfig" --delete "$src" "$dst"
|
||||
rsync -avS --delete "$src" "$dst"
|
||||
echo $d1
|
||||
date
|
||||
|
|
|
|||
32
sync-to
32
sync-to
|
|
@ -5,14 +5,20 @@ set -x
|
|||
|
||||
dsthost="$1"; shift
|
||||
case "$dsthost" in
|
||||
42)
|
||||
dst=42:/home/services/backup/bento
|
||||
loch|rloch)
|
||||
dst=root@$dsthost:/home/services/backup/notebook-manuell/home/users/nico/
|
||||
;;
|
||||
loch)
|
||||
dst=root@loch:/home/services/backup/bento-manuell
|
||||
nico-vm)
|
||||
dst=nico-vm.schottelius.org:/data
|
||||
;;
|
||||
luchsingen)
|
||||
dst=root@luchsingen.schottelius.org:/home/services/backup/bento-manuell
|
||||
freiheit)
|
||||
dst=freiheit:
|
||||
;;
|
||||
local)
|
||||
dst=root@192.168.0.20:/home/services/backup/notebook-manuell/home/users/nico/
|
||||
;;
|
||||
nico-data)
|
||||
dst=nico-data.schottelius.org:/home/nico
|
||||
;;
|
||||
*)
|
||||
echo "Unknown $1" >&2
|
||||
|
|
@ -22,17 +28,11 @@ esac
|
|||
|
||||
start=$(date)
|
||||
rsync -avS --delete --progress \
|
||||
--exclude '/proc/*' \
|
||||
--exclude '/tmp/*' \
|
||||
--exclude '/sys/*' \
|
||||
--exclude '/dev/*' \
|
||||
--exclude '/run/*' \
|
||||
--exclude '/home/services/usbhd' \
|
||||
--exclude '/home/users/nico/.cache/chromium/' \
|
||||
--exclude '/home/users/nico/.bitcoin/blocks/' \
|
||||
--exclude '/home/users/nico/.bitcoin/chainstate/' \
|
||||
--exclude-from=/home/users/nico/.ccollect/defaults/exclude \
|
||||
--exclude /.cache \
|
||||
--exclude ~/temp/ \
|
||||
"$@" \
|
||||
/ "$dst"
|
||||
~/ "$dst"
|
||||
end=$(date)
|
||||
|
||||
echo $start
|
||||
|
|
|
|||
15
wlan
15
wlan
|
|
@ -6,19 +6,16 @@
|
|||
#
|
||||
# Failed due to many reasons. See the working hack/version below.
|
||||
#
|
||||
#
|
||||
#ip link set wlp0s3 down
|
||||
#iwconfig wlp0s3 essid public
|
||||
#ip link set wlp0s3 up
|
||||
#iwconfig wlp0s3 essid public
|
||||
|
||||
if [ "$#" -ge 1 ]; then
|
||||
dev=$1; shift
|
||||
else
|
||||
dev=wlp2s0
|
||||
dev=wlp3s0
|
||||
dev=wlan0
|
||||
dev=wlp2s0
|
||||
dev=wlp1s0
|
||||
dev=wlp4s0
|
||||
dev=wlp3s0
|
||||
fi
|
||||
|
||||
set -x
|
||||
|
|
@ -37,13 +34,17 @@ set -e
|
|||
# ( rmmod iwlagn; modprobe iwlagn; sleep 2 )
|
||||
|
||||
# wpa_supplicant -B -Dwext -iwlp0s3 -c /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
wpa_supplicant -B -Dwext -i$dev -c /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
# wpa_supplicant -B -Dwext -i$dev -c /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
#wpa_supplicant -B -Dnl80211 -i$dev -c /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
wpa_supplicant -B -Dnl80211 -i$dev -c /etc/wpa_supplicant/wpa_supplicant-${dev}.conf
|
||||
# Give wpa some time to connect
|
||||
sleep 5
|
||||
|
||||
# Choose an dhcp client
|
||||
( udhcpc -nqfi $dev || dhcpcd )
|
||||
|
||||
wpa_cli
|
||||
|
||||
# vpnc ~nico/ethz/vpn/sg.conf
|
||||
#vpnc ~nico/firmen/ethz/vpn/vpnc.conf
|
||||
# vpnc-disconnect
|
||||
|
|
|
|||
7
x-auto
7
x-auto
|
|
@ -1,12 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "$0 position"
|
||||
exit 1
|
||||
if [ "$#" -lt 1 ]; then
|
||||
set -- "$@" above
|
||||
fi
|
||||
|
||||
primary=eDP1
|
||||
primary=eDP-1
|
||||
|
||||
# position: something xrandr understands
|
||||
position=$1; shift
|
||||
|
|
|
|||
1
x-oben
1
x-oben
|
|
@ -3,4 +3,5 @@ x-off
|
|||
|
||||
xrandr --output HDMI1 --auto --rotate normal --above eDP1
|
||||
xrandr --output DP1 --auto --rotate normal --above eDP1
|
||||
xrandr --output DP2 --auto --rotate normal --above eDP1
|
||||
xrandr --output VGA1 --auto --rotate normal --above eDP1
|
||||
|
|
|
|||
6
x-off
6
x-off
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
xrandr --output DP1 --off
|
||||
xrandr --output HDMI1 --off
|
||||
xrandr --output VGA1 --off
|
||||
for d in DP1 DP2 HDMI1 HDMI2 VIRTUAL1; do
|
||||
xrandr --output $d --off
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ -x /usr/bin/urxvtcd ] && exec /usr/bin/urxvtcd
|
||||
#[ -x /usr/bin/urxvtcd ] && exec /usr/bin/urxvtcd
|
||||
#exec urxvt "$@"
|
||||
|
||||
exec urxvtc "$@"
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
arrival="2014-7-14"
|
||||
arrival="2014-8-20"
|
||||
|
||||
export arrival
|
||||
|
||||
python3 -c 'import os; import datetime; day=datetime.datetime.strptime(os.environ["arrival"], "%Y-%m-%d"); delta = day - datetime.datetime.now(); print("Sanghee is %sd away" % (delta.days))'
|
||||
Loading…
Add table
Add a link
Reference in a new issue