Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
N
nsbin
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nico Schottelius
nsbin
Commits
256dc987
Commit
256dc987
authored
Mar 08, 2017
by
Nico Schottelius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Major update (yes, longtimenocommit message)
parent
68266e89
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
129 additions
and
79 deletions
+129
-79
.gitignore
.gitignore
+2
-0
backup-marker
backup-marker
+1
-0
delete-mails
delete-mails
+1
-1
edit-server-text-aid-chromium
edit-server-text-aid-chromium
+2
-2
figlet_alle_fonts
figlet_alle_fonts
+3
-1
hole_mails
hole_mails
+24
-14
lh
lh
+3
-1
lock-screen
lock-screen
+10
-1
mailstats
mailstats
+16
-3
my-status-bar
my-status-bar
+2
-1
mympd
mympd
+1
-1
nz
nz
+6
-0
ruagdesktop
ruagdesktop
+1
-1
rxvt_to_urxvt_hack.sh
rxvt_to_urxvt_hack.sh
+0
-1
securemail
securemail
+20
-7
show_calendar
show_calendar
+1
-1
sync-from
sync-from
+3
-5
sync-to
sync-to
+16
-16
wlan
wlan
+8
-7
x-auto
x-auto
+3
-4
x-oben
x-oben
+1
-0
x-off
x-off
+3
-3
x-terminal-emulator
x-terminal-emulator
+2
-1
zu-sanghee
zu-sanghee
+0
-8
No files found.
.gitignore
View file @
256dc987
...
...
@@ -2,3 +2,5 @@ schwanz3*sh
.mac-adresses-csv-to-dhcpd.sh.swp
.*.swp
sut
ctt
consul
backup-marker
View file @
256dc987
#!/bin/sh
touch
"
$0
"
date
>
~/.last-backup
delete-mails
View file @
256dc987
#!/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
edit-server-text-aid-chromium
View file @
256dc987
...
...
@@ -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
...
...
figlet_alle_fonts
View file @
256dc987
...
...
@@ -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
cdis
t | figlet
-f
$BLA
;
done
for
a
in
*
.flf
;
do
BLA
=
${
a
%.flf
}
;
echo
$BLA
;
echo
$tex
t
| figlet
-f
$BLA
;
done
hole_mails
View file @
256dc987
#!/bin/sh
SLEEP
=
$1
if
[
-z
"
$SLEEP
"
]
;
then
echo
"
$0
Zeit zum Schlafen"
exit
1
fi
while
true
;
do
fetchmail
>
/dev/null
offlineimap
fetchmail
>
/dev/null
echo
"Mails abgeholt, schlafe nun
$SLEEP
Sekunde(n)"
sleep
$SLEEP
;
done
securemail
fetchmail
# Disabled by Mon Jun 20 10:56:19 CEST 2016 -- using mu now
# notmuch new
# 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
lh
View file @
256dc987
...
...
@@ -6,4 +6,6 @@ datef="$2"
file
=
$(
date
+%Y-%m-%d
$datef
)
set
-x
$EDITOR
"
${
file
}${
suffix
}
"
# $EDITOR "${file}${suffix}"
emacs
"
${
file
}${
suffix
}
"
lock-screen
View file @
256dc987
#!/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
mailstats
View file @
256dc987
...
...
@@ -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
my-status-bar
View file @
256dc987
...
...
@@ -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
mympd
View file @
256dc987
#!/bin/sh
cd
~/
oeffentlich
/audio
cd
~/
vcs/annex
/audio
mpd
--no-daemon
./mpd.conf
nz
View file @
256dc987
#!/bin/sh
# exec > /tmp/nz
# exec 2>&1
set
-x
ddir
=
"
${
HOME
}
/vcs/notes"
cd
"
$ddir
"
...
...
ruagdesktop
100644 → 100755
View file @
256dc987
#!/bin/sh
xrandr
--output
DP2
--above
eDP1
--auto
xrandr
--output
HDMI1
--
lef
t-of
DP2
--auto
--rotate
left
xrandr
--output
HDMI1
--
righ
t-of
DP2
--auto
--rotate
left
#i3 workspace 5
#i3 move workspace to output right
...
...
rxvt_to_urxvt_hack.sh
View file @
256dc987
...
...
@@ -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"
securemail
View file @
256dc987
...
...
@@ -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"
...
...
show_calendar
View file @
256dc987
...
...
@@ -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
{}
\;
sync-from
View file @
256dc987
...
...
@@ -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
sync-to
View file @
256dc987
...
...
@@ -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
...
...
wlan
View file @
256dc987
...
...
@@ -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
x-auto
View file @
256dc987
#!/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
...
...
x-oben
View file @
256dc987
...
...
@@ -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
x-off
View file @
256dc987
#!/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
x-terminal-emulator
View file @
256dc987
#!/bin/sh
[
-x
/usr/bin/urxvtcd
]
&&
exec
/usr/bin/urxvtcd
#[ -x /usr/bin/urxvtcd ] && exec /usr/bin/urxvtcd
#exec urxvt "$@"
exec
urxvtc
"
$@
"
zu-sanghee
deleted
100755 → 0
View file @
68266e89
#!/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))'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment