Compare commits
No commits in common. "master" and "84582af" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,5 +1,3 @@
|
||||
*/venv
|
||||
|
||||
# ---> Linux
|
||||
*~
|
||||
|
||||
|
9
.gitmodules
vendored
9
.gitmodules
vendored
@ -1,9 +0,0 @@
|
||||
[submodule "nagios"]
|
||||
path = nagios.src
|
||||
url = https://git.mount-mockery.de/pylib/nagios.git
|
||||
[submodule "pyrip"]
|
||||
path = pyrip
|
||||
url = https://git.mount-mockery.de/application/pyrip.git
|
||||
[submodule "pyrip.src"]
|
||||
path = pyrip.src
|
||||
url = https://git.mount-mockery.de/application/pyrip.git
|
@ -3,21 +3,48 @@
|
||||
|
||||
#
|
||||
# Additional Packages
|
||||
COMMON="keepass2 xdotool systemd-sysv openssh-server vim-nox tree"
|
||||
# COMMON="$COMMON curlftpfs"
|
||||
COMMON="$COMMON tlp tlp-rdw"
|
||||
COMMON="$COMMON fonts-powerline"
|
||||
COMMON="$COMMON nextcloud-desktop dolphin-nextcloud"
|
||||
# COMMON="$COMMON fonts-powerline powerline powerline-gitstatus"
|
||||
COMMON="joe keepass2 xdotool powerline fonts-powerline powerline-gitstatus curlftpfs libstdc++6"
|
||||
|
||||
MULTIMEDIA="rhythmbox ario kodi kodi-pvr-hts"
|
||||
MULTIMEDIA="$MULTIMEDIA lame"
|
||||
MULTIMEDIA="$MULTIMEDIA qjackctl carla carla-lv2 carla-vst ardour calf-plugins eq10q fluid-soundfont-gm fluid-soundfont-gs lame"
|
||||
_COMMON="
|
||||
joe git tmux
|
||||
keepass2 xdotool
|
||||
brasero
|
||||
sshfs curlftpfs openssh-server
|
||||
fonts-powerline powerline python3-powerline python3-powerline-gitstatus
|
||||
lib32stdc++6
|
||||
"
|
||||
|
||||
TOOLS="wavemon evolution retext gnuplot latexmk texlive-latex-recommended texlive-latex-extra texlive-lang-german texlive-plain-generic texlive-fonts-recommended"
|
||||
MULTIMEDIA="qjackctl ardour calf-plugins eq10q fluid-soundfont-gm fluid-soundfont-gs lame kodi"
|
||||
|
||||
PROGRAMMING="python-is-python3 python3-venv pkgconf libgtk2.0-dev jq meld"
|
||||
_MULTIMEDIA="
|
||||
ffmpeg
|
||||
kodi kodi-pvr-hts
|
||||
spotify-client
|
||||
"
|
||||
|
||||
TOOLS="evolution latexmk texlive-generic-recommended texlive-latex-extra texlive-lang-german texlive-fonts-recommended"
|
||||
|
||||
_TOOLS="
|
||||
evolution
|
||||
gnuplot
|
||||
gnome-boxes
|
||||
gvncviewer
|
||||
texlive-binaries texlive-latex-extra texlive-lang-german texlive-fonts-recommended texstudio
|
||||
gimp
|
||||
"
|
||||
|
||||
PROGRAMMING="virtualenv python3-wxgtk4.0 qt5dxcb-plugin"
|
||||
|
||||
_PROGRAMMING="
|
||||
pycodestyle
|
||||
virtualenv
|
||||
python-coverage python3-coverage python-jinja2 python3-jinja2
|
||||
python-wxtools python3-wxgtk4.0
|
||||
python3-evdev python3-serial
|
||||
python3-sphinx python3-sphinx-rtd-theme
|
||||
meld
|
||||
retext
|
||||
"
|
||||
|
||||
ALL=$COMMON\ $MULTIMEDIA\ $TOOLS\ $PROGRAMMING
|
||||
|
||||
|
@ -3,12 +3,7 @@
|
||||
git config --global user.name "Dirk Alders"
|
||||
git config --global user.email dirk@mount-mockery.de
|
||||
#
|
||||
git config --global pull.rebase false
|
||||
#
|
||||
git config --global diff.tool meld
|
||||
git config --global merge.tool meld
|
||||
git config --global merge.tool.cmd 'meld --auto-merge "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED"'
|
||||
git config --global --add difftool.prompt false
|
||||
#
|
||||
git config --global config credential.helper store
|
||||
|
||||
git config --global pull.rebase false
|
||||
|
12
giti
12
giti
@ -4,11 +4,10 @@
|
||||
#
|
||||
# command line arguments
|
||||
#
|
||||
usage="Usage: $0 [-p | output for prompt] [-s | short output]"
|
||||
while getopts "hps" options; do
|
||||
usage="Usage: $0 [-p | output for prompt]"
|
||||
while getopts "hp" options; do
|
||||
case $options in
|
||||
p ) PROMPT="True";;
|
||||
s ) SHORT="True";;
|
||||
h ) echo $usage
|
||||
exit 0
|
||||
;;
|
||||
@ -76,9 +75,6 @@ fi
|
||||
if [[ $PROMPT ]]; then
|
||||
# print status
|
||||
echo -e "$git_status_color├──$COLOR_GREEN($git_branch)$git_status_color - $git_status_text - $COLOR_CYAN$git_url$COLOR_WHITE"
|
||||
elif [[ $SHORT ]]; then
|
||||
echo -n -e "$COLOR_GREEN($git_branch)$git_status_color - $git_status_text $COLOR_WHITE"
|
||||
exit 0
|
||||
else
|
||||
# print status and
|
||||
echo -e "$git_status_color┌───┤ $git_status_text ├────────────────────────────────────────────────────────────────"
|
||||
@ -86,6 +82,8 @@ else
|
||||
|
||||
if [[ ! $git_diff == "" ]]; then
|
||||
echo -e "$git_status_color├────────────────────────────────────────────────────────────────────────────────────"
|
||||
else
|
||||
echo -e "$git_status_color└────────────────────────────────────────────────────────────────────────────────────$COLOR_WHITE\n \b"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -94,7 +92,7 @@ if [[ ! $git_diff == "" ]]; then
|
||||
if [[ ! $PROMPT || "$GIT_PROMPT_DETAILS" == "on" ]]; then
|
||||
IFS=$'\n'
|
||||
for ENTRY in $git_diff; do
|
||||
if [[ $ENTRY = "D "* ]] || [[ $ENTRY = "A "* ]] || [[ $ENTRY = "M "* ]] || [[ $ENTRY = "R "* ]]; then
|
||||
if [[ $ENTRY = "D "* ]] || [[ $ENTRY = "A "* ]] || [[ $ENTRY = "M "* ]] || [[ $ENTRY = "MM"* ]] || [[ $ENTRY = "R "* ]]; then
|
||||
echo -e "$git_status_color│ $COLOR_DARKYELLOW$ENTRY"
|
||||
else
|
||||
echo -e "$git_status_color│ $COLOR_YELLOW$ENTRY"
|
||||
|
2
gitt
2
gitt
@ -1,3 +1,3 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
git log --graph --oneline --all --decorate --topo-order $*
|
||||
git log --graph --oneline --all --decorate --topo-order
|
||||
|
@ -1,16 +1,4 @@
|
||||
#!/bin/sh
|
||||
clear
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
for s in $(tmux list-sessions -F '#{session_name}'); do
|
||||
p=$(tmux list-panes -F '#{pane_tty}' -t "$s")
|
||||
if [ "$p" = "$(tty)" ]; then
|
||||
# Session already running
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
tmux attach-session -t mqtt_smarthome || tmux new-session -s mqtt_smarthome "/opt/mqtt_sniffer/venv/bin/python /opt/mqtt_sniffer/mqtt_sniffer.py -f mqtt.home"
|
||||
/opt/mqtt_sniffer/venv/bin/python /opt/mqtt_sniffer/mqtt_sniffer.py -f mqtt.home
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
/opt/mqtt_sniffer/venv/bin/python /opt/mqtt_sniffer/mqtt_sniffer.py $*
|
||||
|
@ -1,16 +0,0 @@
|
||||
#!/bin/sh
|
||||
clear
|
||||
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
for s in $(tmux list-sessions -F '#{session_name}'); do
|
||||
p=$(tmux list-panes -F '#{pane_tty}' -t "$s")
|
||||
if [ "$p" = "$(tty)" ]; then
|
||||
# Session already running
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
tmux attach-session -t mqtt_test_smarthome || tmux new-session -s mqtt_test_smarthome "/opt/mqtt_sniffer/venv/bin/python /opt/mqtt_sniffer/mqtt_sniffer.py -f mqtt.home -p 1884 -n"
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 8726b19639832d3ce0653bb91bd74e2e2a64bc3f
|
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
BASEDIR=$(dirname $0)
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
python3 $BASEDIR/nagios.src/status.py nagios.home
|
||||
else
|
||||
python3 $BASEDIR/nagios.src/status.py $*
|
||||
fi
|
||||
|
6
netst
6
netst
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
BASEDIR=$(dirname $0)
|
||||
|
||||
$BASEDIR/netst.src/venv/bin/python $BASEDIR/netst.src/netst.py $*
|
||||
|
@ -1,67 +0,0 @@
|
||||
import dns.resolver
|
||||
import ifcfg
|
||||
import json
|
||||
import socket
|
||||
import struct
|
||||
import sys
|
||||
import time
|
||||
|
||||
interfaces = ifcfg.interfaces()
|
||||
|
||||
def exit_device():
|
||||
print("Possible devices:", ", ".join(interfaces.keys()))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def gateway(device):
|
||||
with open("/proc/net/route") as fh:
|
||||
# skip header
|
||||
next(fh)
|
||||
for line in fh:
|
||||
routes = line.strip().split()
|
||||
if routes[0] == device:
|
||||
destination = socket.inet_ntoa(struct.pack("<L", int(routes[1], 16)))
|
||||
if destination != "0.0.0.0":
|
||||
continue
|
||||
return socket.inet_ntoa(struct.pack("<L", int(routes[2], 16)))
|
||||
|
||||
|
||||
try:
|
||||
DEVICE = sys.argv[1]
|
||||
except IndexError:
|
||||
print("You need to give the device name as first argument!\n")
|
||||
exit_device()
|
||||
|
||||
HRN = { # Human Readable Name
|
||||
'MAC': 'ether',
|
||||
'MTU': 'mtu',
|
||||
'IP': 'inet',
|
||||
'Netmask': 'netmask',
|
||||
}
|
||||
|
||||
try:
|
||||
info = interfaces[DEVICE]
|
||||
except KeyError:
|
||||
print("Unknown device:", DEVICE, "\n")
|
||||
exit_device()
|
||||
try:
|
||||
dns_resolver = dns.resolver.Resolver()
|
||||
except dns.resolver.NoResolverConfiguration:
|
||||
dns_server = []
|
||||
else:
|
||||
dns_server = dns_resolver.nameservers
|
||||
|
||||
print('+' + 27 * '-' + '+')
|
||||
print("|%9s: %s" % ('Device', DEVICE) + (16 - len(DEVICE)) * ' ' + '|')
|
||||
print('+' + 27 * '-' + '+')
|
||||
for name in HRN:
|
||||
print("%10s: %s" % (name, info[HRN[name]]))
|
||||
print("%10s: %s" % ('Gateway', gateway(DEVICE)))
|
||||
|
||||
try:
|
||||
print("%10s: %s" % ("Domain", socket.getfqdn().split('.', 1)[1]))
|
||||
except IndexError:
|
||||
print("%10s: None" % "Domain")
|
||||
for i, dns in enumerate(dns_server):
|
||||
print("%10s: %s" % ("DNS_%d" % (i + 1), dns))
|
||||
|
@ -1,3 +0,0 @@
|
||||
ifcfg
|
||||
dnspython
|
||||
|
6
pyrip
6
pyrip
@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
BASEDIR=$(dirname $0)
|
||||
|
||||
$BASEDIR/pyrip.src/venv/bin/python $BASEDIR/pyrip.src/pyrip.py $*
|
||||
|
@ -1 +0,0 @@
|
||||
Subproject commit 48dc481f268e1ecdcd8d5e0126df553781e40a78
|
Loading…
x
Reference in New Issue
Block a user