Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2013-10-26 23:28:38 +02:00
parent 3187235b6c
commit 9468f9b060
34 changed files with 108 additions and 58 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
schwanz3*sh
.mac-adresses-csv-to-dhcpd.sh.swp
.*.swp
sut

4
3xterm
View file

@ -5,5 +5,5 @@ XTERM=x-terminal-emulator
$XTERM -ls -title "--irst 0n3xx" &
$XTERM -ls -title ">>> 2nd <<<" &
$XTERM -ls -title "www.3rd.xterm" &
sleep 0.5
i3-msg mh
# sleep 0.5
# i3-msg mh

View file

@ -3,4 +3,6 @@
if grep -q closed /proc/acpi/button/lid/*/state; then
sleep 3
su nico -c "DISPLAY=:0.0 xset dpms force off"
else
su nico -c "DISPLAY=:0.0 xset dpms force on"
fi

0
backup-marker Normal file → Executable file
View file

View file

@ -9,4 +9,5 @@ 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 $BLA | figlet -f $BLA; done
for a in *.flf; do BLA=${a%.flf}; echo $BLA ; echo cdist | figlet -f $BLA; done

View file

@ -11,7 +11,7 @@
#firstfile=~/.mutt/preferred_mailboxes
echo 'set folder="~/Maildir"'
#echo 'set folder="~/Maildir"'
if [ -f ~/.mutt/important_mailboxes ]; then
cat ~/.mutt/important_mailboxes
@ -23,3 +23,8 @@ find ~/Maildir/ -type d -name new | \
-e s'/mailboxes +postponed\///g' \
-e 's/mailboxes +$//g' | \
grep -v '^$'
if [ -f ~/.mutt/unimportant_mailboxes ]; then
cat ~/.mutt/unimportant_mailboxes
fi

View file

@ -25,4 +25,4 @@ EXTENSION=".tar.bz2"
FULL_URL=${BASEURL}${VERSION}${EXTENSION}
wget "$FULL_URL"
wget -c "$FULL_URL"

View file

@ -10,6 +10,7 @@ fi
while true; do
fetchmail >/dev/null
offlineimap
fetchmail >/dev/null
echo "Mails abgeholt, schlafe nun $SLEEP Sekunde(n)"
sleep $SLEEP;
done

View file

@ -1,12 +1,13 @@
#!/bin/sh
set -x
BDIR=~/temp/build/ikiwiki
BDIR=~/p/foreign/ikiwiki
( cd "${BDIR}" && git describe )
START="$(date)"
PERL5LIB=${BDIR} ${BDIR}/ikiwiki.in \
--setup ikiwiki.setup \
--templatedir ${BDIR}/templates \
"$@"
ret=$?
END="$(date)"
@ -15,4 +16,3 @@ echo ${START} - ${END}: ikiwiki result: $?
# -set underlaydir=${BDIR}/underlays/basewiki \
# -set underlaydirbase=${BDIR}/underlays \
# --libdir ${BDIR} \
# --templatedir ${BDIR}/templates \

View file

@ -26,7 +26,7 @@ set -ex
dev="$1"
destbase=~nico/photos
dest=$destbase/$(date +%Y%m%d).eingehend
mp="/mnt"
mp="/mnt/kamera"
if [ ! -e "$destbase" ]; then
echo "base $destbase not existing" >&2
@ -38,5 +38,5 @@ sudo mount "$dev" "$mp" -o uid=nico
mv -i "$mp/DCIM/"*/* "$dest"
sudo umount "$mp"
sudo chown -R nico "$dest"
su nico -c "cd $dest && renrot IMG_*.*"
su nico -c "cd $dest && renrot IMG_*.JPG DSC*JPG"
rm -f $dest/*_orig

View file

@ -38,5 +38,5 @@ parallel="-j8"
make $parallel all
# install
sudo ~/bin/linux/install
echo sudo ~/bin/linux/install "$1"
)

View file

@ -23,11 +23,18 @@ set -e
version=$(cat include/config/kernel.release)
ddir="/boot"
spath="arch/x86/boot/bzImage"
fname="vmlinuz-$version"
fname="vmlinuz-nico"
if [ "$#" -ne 1 ]; then
echo "Give suffix for kernel"
exit 1
fi
basename="$1"
fname="vmlinuz-$basename"
fpath="${ddir}/${fname}"
gpath="$ddir/grub/menu.lst"
initramfs="/boot/initramfs-nico.img"
initramfs="/boot/initramfs-${basename}.img"
#make install

View file

@ -1,3 +1,3 @@
#!/bin/sh
script -a ~/localch/logs/$(date +%Y-%m-%d).script "$@"
script -a ~/localch/vcs/logs/$(date +%Y-%m-%d).script "$@"

View file

@ -1,4 +1,5 @@
#!/bin/sh
~/b/i3lock/i3lock -t -i /home/users/nico/oeffentlich/bilder/linux-tux-bsd/think_linux_kachel.png
xset dpms force off
i3lock -c fe0000 -d
#~/b/i3lock/i3lock -t -i /home/users/nico/oeffentlich/bilder/linux-tux-bsd/think_linux_kachel.png
# xset dpms force off

View file

@ -1 +1 @@
sshfs nutzer@loch.schottelius.org:/ ~/.loch
sshfs nutzer@loch:/ ~/.loch

View file

@ -1,6 +1,5 @@
#!/bin/sh
i3status | while :
do
read line

6
nz
View file

@ -1,7 +1,5 @@
#!/bin/sh
ddir="${HOME}/privat/persoenlich/notizen"
file=$(date +%Y-%m-%d)
dfile="${ddir}/${file}"
set -x
$EDITOR "${dfile}"
cd "$ddir"
lh "$@"

View file

@ -1,6 +1,6 @@
#!/bin/sh
#!/bin/sh -e
file=$1
file="$1"
host=home.schottelius.org
dir=public_html/temp/
url="http://home.schottelius.org/~nico/temp"

View file

@ -6,7 +6,7 @@
#
while true; do
reset
ssh "$@"
read foo
reset
done

View file

@ -20,11 +20,21 @@ HOST="nico@62.65.138.78"
HOST="home.schottelius.org"
HOST="nico@77.109.138.222"
ssh -T -f -C -N -L2323:mx3.schottelius.org:$IMAPS "$HOST"
ssh -T -f -C -N -L4241:mx3.schottelius.org:$SMTP "$HOST"
if [ $# -ge 1 ]; then
HOST=$1; shift
fi
ssh -T -f -C -N \
-L2323:mx3.schottelius.org:$IMAPS \
-L4241:mx3.schottelius.org:$SMTP \
-L2324:imap.googlemail.com:$IMAPS \
-L2325:mail.zhaw.ch:$IMAPS \
-R :4242:localhost:22 \
-D 12345 \
"$HOST" "$@"
# Fernzugriff
ssh -T -f -C -N -R4242:localhost:22 "$HOST"
# ssh -T -f -C -N -R4242:localhost:22 "$HOST"
#ssh -T -f -C -N -L2342:mx2.schottelius.org:$SMTP 62.65.138.66
#ssh -T -f -C -N -L4242:imaps.schottelius.org:$IMAPS "$HOST"

View file

@ -4,5 +4,6 @@
# Kill ssh tunnels
#
pkill -f -u nico "ssh -T -f -C -N -L"
pkill -f -u nico "ssh -T -f -C -N -R"
#pkill -f -u nico "ssh -T -f -C -N -L"
#pkill -f -u nico "ssh -T -f -C -N -R"
pkill -f -u nico "ssh -T -f -C -N"

View file

@ -1,5 +1,5 @@
#!/bin/sh
xtrlock &
sudo /usr/sbin/pm-suspend
#echo mem > /sys/power/state
#xtrlock &
#sudo "echo mem > /sys/power/state"
~/bin/lock-screen && sudo /usr/sbin/pm-suspend

View file

@ -19,5 +19,8 @@ dst=$1; shift
sshdir=$(cd "$__abs_mydir/../.ssh" && pwd -P)
sshkey=$sshdir/id_rsa
d1=$(date)
set -x
rsync -av -e "ssh -i $sshkey" --delete "$src" "$dst"
echo $d1
date

View file

@ -1,15 +1,20 @@
#!/bin/sh
start=$(date)
~nico/bin/backup-marker
rsync -av --delete --progress \
--exclude '/proc/*' \
--exclude '/tmp/*' \
--exclude '/sys/*' \
--exclude '/dev/*' \
--exclude '/home/users/nico/.bitcoin/blocks/' \
--exclude '/home/users/nico/.bitcoin/chainstate/' \
--exclude '/home/services/usbhd' \
"$@" \
/ root@rrloch:/home/services/buch/backup/bento
/ root@loch:/home/services/backup/bento-manuell
#/ root@zuhause.schottelius.org:/home/services/backup/bento-manuell
#/ root@zuhause.schottelius.org:/home/services/backup/bento-manuell
end=$(date)
echo $start

View file

@ -1,4 +1,5 @@
#!/bin/sh
# Open vim
x-terminal-emulator -e vim "$@"
# x-terminal-emulator -e vim "$@"
urxvt -e vim "$@"

View file

@ -1 +1 @@
wget -x -l 1 -r -k -p -H -N "$@"
wget -x -l 1 -r -k -p -H -N -E "$@"

26
wlan
View file

@ -2,31 +2,41 @@
# Nico Schottelius, 20080910 11:09
# The initial version
#
# udhcpc -nfqi wlan0 && vpnc ~nico/ethz/vpn/pc.conf
# udhcpc -nfqi wlp0s3 && vpnc ~nico/ethz/vpn/pc.conf
#
# Failed due to many reasons. See the working hack/version below.
#
#
#ip link set wlan0 down
#iwconfig wlan0 essid public
#ip link set wlan0 up
#iwconfig wlan0 essid public
#ip link set wlp0s3 down
#iwconfig wlp0s3 essid public
#ip link set wlp0s3 up
#iwconfig wlp0s3 essid public
dev=wlp2s0
dev=wlp3s0
set -x
set +e
wpa_cli terminate || true
#rmmod b43 bcma
sleep 1
#modprobe b43
set -e
#ip l s eth0 down
# Ensure previous wpa_supplicant is not running
( wpa_cli terminate || exit 0 )
# Ensure the adapter works, reloading the driver helps
( rmmod iwlagn; modprobe iwlagn; sleep 2 )
# ( rmmod iwlagn; modprobe iwlagn; sleep 2 )
wpa_supplicant -B -Dwext -iwlan0 -c ~nico/ethz/wlan/wpa_supplicant.conf
# 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
# Give wpa some time to connect
sleep 5
# Choose an dhcp client
( udhcpc -nqfi wlan0 || dhcpcd wlan0 )
( udhcpc -nqfi $dev || dhcpcd )
# vpnc ~nico/ethz/vpn/sg.conf
#vpnc ~nico/firmen/ethz/vpn/vpnc.conf

View file

@ -1,4 +1,4 @@
#!/bin/sh
# xrandr --output HDMI2 --auto --above LVDS1
# xrandr --output HDMI1 --auto --above DP1
xrandr --output VGA1 --off
xrandr --output HDMI1 --auto --left-of LVDS1 --rotate left
xrandr --output HDMI1 --auto --left-of DP1 --rotate left

View file

@ -1,3 +1,4 @@
#!/bin/sh
xrandr --output HDMI1 --off
xrandr --output VGA1 --auto --same-as LVDS1
xrandr --output VGA1 --auto --same-as DP1
xrandr --output DP1 --auto --same-as DP1

View file

@ -1,4 +1,5 @@
#!/bin/sh
xrandr --output HDMI1 --off
xrandr --output DP1 --off
xrandr --output HDMI1 --auto --rotate normal --left-of eDP1
x-off
xrandr --output HDMI1 --auto --rotate normal --left-of LVDS1
xrandr --output DP1 --auto --rotate normal --left-of LVDS1

9
x-oben
View file

@ -1,7 +1,6 @@
#!/bin/sh
xrandr --output HDMI1 --off
xrandr --output DP1 --off
x-off
xrandr --output eDP1 --auto
xrandr --output HDMI1 --auto --rotate normal --above eDP1
xrandr --output DP1 --auto --rotate normal --above eDP1
xrandr --output HDMI1 --auto --rotate normal --above LVDS1
xrandr --output DP1 --auto --rotate normal --above LVDS1
xrandr --output VGA1 --auto --rotate normal --above LVDS1

2
x-off
View file

@ -1,4 +1,4 @@
#!/bin/sh
xrandr --output HDMI2 --off
xrandr --output DP1 --off
xrandr --output HDMI1 --off
xrandr --output VGA1 --off

View file

@ -1,2 +1,5 @@
#!/bin/sh
x-off
xrandr --output DP1 --auto --rotate normal --right-of LVDS1
xrandr --output HDMI1 --auto --rotate normal --right-of LVDS1

3
x-vga
View file

@ -1,3 +1,4 @@
#!/bin/sh
xrandr --output HDMI1 --off
xrandr --output VGA1 --auto --above LVDS1
xrandr --output VGA1 --auto --same-as DP1
xrandr --output DP1 --auto --same-as DP1