Browse Source

Initial bin folder

84582af
Dirk Alders 4 years ago
parent
commit
6f61f0dfea

+ 31
- 0
amplifier View File

@@ -0,0 +1,31 @@
1
+#!/usr/bin/env python2
2
+import subprocess
3
+import time
4
+
5
+
6
+def monitor_state():
7
+    mon_state = subprocess.check_output(['/usr/bin/tvservice',  '-s'])
8
+    return mon_state.split(' ')[1] in ['0xa', '0x12000a', '0x40002']
9
+
10
+
11
+def kodi_state():
12
+    response = urllib2.urlopen('http://music:8080/jsonrpc?request={%22jsonrpc%22:%20%222.0%22,%20%22method%22:%20%22Player.GetActivePlayers%22,%20%22id%22:%201}')
13
+    json_txt = response.read()
14
+    response.close()  # best practice to close the file
15
+    response = json.loads(json_txt)
16
+    return len(response['result']) > 0
17
+
18
+
19
+
20
+prev_state = None
21
+while True:
22
+    # second count
23
+    curr_state = monitor_state()
24
+    # check if there is a change in the screen state
25
+    if curr_state != prev_state:
26
+        if curr_state is True:
27
+            subprocess.check_output(['sispmctl', '-o', '1'])
28
+        else:
29
+            subprocess.check_output(['sispmctl', '-f', '1'])
30
+    prev_state = curr_state
31
+    time.sleep(1.)

+ 1
- 0
apt-install-from-list View File

@@ -0,0 +1 @@
1
+xargs -a "$1" apt-get install

+ 1
- 0
apt-package-list View File

@@ -0,0 +1 @@
1
+dpkg --get-selections | awk '!/deinstall|purge|hold/ {print $1}'

+ 1
- 0
backup_data.sh View File

@@ -0,0 +1 @@
1
+sudo obnam backup /data

+ 1
- 0
dvd2wav View File

@@ -0,0 +1 @@
1
+mplayer -vo null -ao pcm -ao pcm:file=audio.wav dvd://01

+ 3
- 0
ffmpeg2avi View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+ffmpeg -i $1 -qscale:v 5 -c:v libxvid -tune film $2

+ 3
- 0
ffmpeg2avi_169 View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+ffmpeg -i $1 -qscale:v 5 -c:v libxvid -aspect 16:9 $2

+ 3
- 0
ffmpeg2mp4 View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+ffmpeg -i $1 -vcodec libx264 -crf 18 -tune animation $2

+ 3
- 0
ffmpeg2mp4_169 View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+ffmpeg -i $1 -vcodec libx264 -crf 18 -tune animation -aspect 16:9 $2

+ 3
- 0
garage View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+python3 ~/prj/clients/garage/tcp_client.py

+ 8
- 0
gitconfig View File

@@ -0,0 +1,8 @@
1
+#!/bin/sh
2
+#
3
+git config --global user.name "Dirk Alders"
4
+git config --global user.email dirk@mount-mockery.de
5
+#
6
+git config --global diff.tool meld
7
+git config --global merge.tool meld
8
+git config --global --add difftool.prompt false

+ 68
- 0
giti View File

@@ -0,0 +1,68 @@
1
+#!/bin/bash
2
+#
3
+usage="Usage: $0 [-n | no details] [-r | repeat]"
4
+while getopts "hnrs" options; do
5
+  case $options in
6
+    n ) NO_DETAILS="True";;
7
+    r ) REPEAT="True";;
8
+    h ) echo $usage
9
+        exit 0
10
+        ;;
11
+   \? ) echo $usage
12
+        exit 1
13
+        ;;
14
+  esac
15
+done
16
+
17
+if [[ $REPEAT == "True" ]]; then
18
+    watch -n 1 -c "clear && $0 -s"
19
+else
20
+    COLOR_WHITE="\033[00m"
21
+    COLOR_CYAN="\033[1;36m"
22
+    COLOR_RED="\033[1;31m"
23
+    COLOR_YELLOW="\033[1;33m"
24
+    COLOR_DARKYELLOW="\033[0;33m"
25
+    COLOR_GREEN="\033[1;32m"
26
+    COLOR_DARKGREEN="\033[0;32m"
27
+    COLOR_OCHRE="\033[38;5;95m"
28
+    #
29
+    git_status="$(LANGUAGE='en_US.UTF-8 git' git status 2> /dev/null)"
30
+    git_diff="$(git  status --porcelain 2> /dev/null)"
31
+    #
32
+    if [[ ! $git_status = "" ]]; then
33
+    git_branch="$(git branch 2> /dev/null | sed --quiet 's/* \(.*\)/\1/p')"
34
+    git_url="$(git config --get remote.origin.url 2> /dev/null)"
35
+    if [[ ! $git_status =~ "working tree clean" ]] && [[ ! $git_status =~ "working directory clean" ]]; then
36
+      git_status_color="$COLOR_RED"
37
+      git_status_text="╡ local changes ╞"
38
+    elif [[ $git_status =~ "Your branch is behind" ]]; then
39
+      git_status_color="$COLOR_YELLOW"
40
+      git_status_text="╡ pull required ╞"
41
+    elif [[ $git_status =~ "Your branch is ahead of" ]]; then
42
+      git_status_color="$COLOR_YELLOW"
43
+      git_status_text="╡ push required ╞"
44
+    elif [[ $git_status =~ "nothing to commit" ]]; then
45
+      git_status_color="$COLOR_DARKGREEN"
46
+      git_status_text="╡ clean ╞════════"
47
+    else
48
+      git_status_color="$COLOR_OCHRE"
49
+      git_status_text="╡ unknown ╞══════"
50
+    fi
51
+
52
+    echo -e "$git_status_color╔═══$git_status_text════════════════════════════════════════════════════════════════"
53
+    echo -e "$git_status_color║ $COLOR_GREEN($git_branch)  $COLOR_CYAN$git_url"
54
+
55
+    if [[ ! $git_diff == "" && $NO_DETAILS != "True" ]]; then
56
+      echo -e "$git_status_color╠════════════════════════════════════════════════════════════════════════════════════"
57
+      IFS=$'\n'
58
+      for ENTRY in $git_diff; do 
59
+        if [[ $ENTRY = "D "* ]] || [[ $ENTRY = "A "* ]] || [[ $ENTRY = "M "* ]] || [[ $ENTRY = "R "* ]]; then
60
+          echo -e "$git_status_color║ $COLOR_DARKYELLOW$ENTRY"
61
+        else
62
+          echo -e "$git_status_color║ $COLOR_YELLOW$ENTRY"
63
+        fi
64
+      done
65
+    fi
66
+    echo -e "$git_status_color╚════════════════════════════════════════════════════════════════════════════════════$COLOR_WHITE\n \b"
67
+    fi
68
+fi

+ 3
- 0
gits View File

@@ -0,0 +1,3 @@
1
+#!/bin/bash
2
+#
3
+git status

+ 3
- 0
gitt View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+git log --graph --oneline --all --decorate --topo-order

+ 13
- 0
init_homepath View File

@@ -0,0 +1,13 @@
1
+#!/bin/sh
2
+#
3
+
4
+rm -f $HOME/data; ln -s /user_data/data/$USER $HOME/data
5
+
6
+for folder in Bilder Dokumente eclipse Musik prj Schreibtisch; do
7
+    rm -rf $HOME/$folder; ln -s /user_data/data/$USER/$folder $HOME
8
+done
9
+
10
+
11
+for folder in Audio Downloads Videos; do
12
+    rm -rf $HOME/$folder; ln -s /user_data/static_data/$USER/$folder $HOME
13
+done

+ 3
- 0
irssi_mm View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+ssh mount-mockery.de -t "tmux attach-session -t irssi || tmux new-session -s irssi"

BIN
latex_doc/static/merkblatt/edit.png View File


BIN
latex_doc/static/merkblatt/folie.png View File


BIN
latex_doc/static/merkblatt/info.png View File


BIN
latex_doc/static/merkblatt/merk.png View File


BIN
latex_doc/static/merkblatt/station.png View File


+ 82
- 0
latex_doc/static/präsentation/connect_style/beamertheme.sty View File

@@ -0,0 +1,82 @@
1
+% Copyright 2007 by Till Tantau
2
+%
3
+% This file may be distributed and/or modified
4
+%
5
+% 1. under the LaTeX Project Public License and/or
6
+% 2. under the GNU Public License.
7
+%
8
+% See the file doc/licenses/LICENSE for more details.
9
+
10
+\ProvidesPackageRCS $Header: /Users/joseph/Documents/LaTeX/beamer/base/themes/theme/compatibility/beamerthemeshadow.sty,v d02a7cf4d8ae 2010/06/17 09:11:41 rivanvx $
11
+
12
+\usepackage[utf8]{inputenc}
13
+\usepackage{german}
14
+\usepackage{etoolbox}
15
+\usepackage[absolute,overlay]{textpos}
16
+\setlength{\TPHorizModule}{1mm}
17
+\setlength{\TPVertModule}{\TPHorizModule}
18
+
19
+\newif\ifconfidential
20
+\newcommand{\SetConfidential}{\confidentialtrue}
21
+
22
+\mode<presentation>
23
+\logo{\includegraphics[width=12.5cm]{connect_style_new/connect_header.png}\hspace*{0.1cm}\vspace*{7.65cm}}
24
+
25
+\definecolor{MyRed}{RGB}{160,0,32}
26
+\definecolor{MyGrey}{RGB}{18,27,39}
27
+\definecolor{MyBlue}{RGB}{99,137,149}
28
+% MyLight...[i] = My...[i] + (255-My...[i]) * 0.95
29
+\definecolor{MyLightRed}{RGB}{250,242,244}  
30
+\definecolor{MyLightGrey}{RGB}{243,244,244}
31
+\definecolor{MyLightBlue}{RGB}{247,249,250}
32
+
33
+
34
+\setbeamercolor{title}{fg=MyRed}
35
+\setbeamercolor{frametitle}{fg=MyRed}
36
+\setbeamerfont{frametitle}{size=\Large}
37
+\setbeamercolor{framesubtitle}{fg=MyGrey}
38
+\setbeamerfont{framesubtitle}{size=\large\bf}
39
+\setbeamercolor{structure}{fg=MyRed}
40
+
41
+\useinnertheme[shadow=true]{rounded}
42
+\setbeamertemplate{blocks}[rounded][shadow=true]
43
+
44
+\setbeamercolor{block title}{fg=black,bg=MyGrey}
45
+\setbeamercolor{block body}{bg=MyLightGrey}
46
+\AtBeginEnvironment{block}{\setbeamercolor{item projected}{bg=MyGrey}}
47
+
48
+\setbeamercolor{block title example}{fg=white,bg=MyBlue}
49
+\setbeamercolor{block body example}{bg=MyLightBlue}
50
+\AtBeginEnvironment{exampleblock}{\setbeamercolor{item projected}{bg=MyBlue}}
51
+
52
+\setbeamercolor{block title alerted}{fg=white,bg=MyRed}
53
+\setbeamercolor{block body alerted}{bg=MyLightRed}
54
+\AtBeginEnvironment{alertblock}{\setbeamercolor{item projected}{bg=MyRed}}
55
+
56
+\beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}
57
+\beamertemplatenavigationsymbolsempty
58
+\setbeamertemplate{footline}[text line]{%
59
+\parbox{\linewidth}{\vspace*{-9pt}\hspace*{-17pt}\textcolor{MyGrey}{{\bf\thepage}\hspace*{4em}\inserttitle~-~\insertauthor~-~\today}}}
60
+\renewcommand{\titlepage}[0]{
61
+\begin{textblock}{125}(0,0)
62
+\includegraphics[width=12.8cm]{connect_style_new/connect_title_page}
63
+\end{textblock}
64
+\begin{textblock}{75}(16,60)
65
+\textcolor{MyRed}{\bf\inserttitle}\\[3pt]\scriptsize\textcolor{MyGrey}{\bf\insertsubtitle}
66
+\end{textblock}
67
+\begin{textblock}{75}(16,71)
68
+\tiny\insertauthor~---~\insertdate
69
+\end{textblock}
70
+\ifconfidential
71
+\begin{textblock}{59}(3,60)
72
+\scriptsize
73
+\textcolor{MyRed}{Dieses Dokument und dessen Inhalt ist vertraulich und darf
74
+ohne Einverständnis von LMH/ ELE2 weder vollständig noch teilweise
75
+weitergegeben werden.}\\[6pt] \textcolor{MyRed}{This document and it's content
76
+is confidential. It is not allowed to pass it fully or partially without
77
+agreement of LMH/ ELE2.}
78
+\end{textblock}
79
+\fi
80
+}
81
+\mode
82
+<all>

BIN
latex_doc/static/präsentation/connect_style/connect_header.png View File


BIN
latex_doc/static/präsentation/connect_style/connect_title_page.png View File


+ 77
- 0
latex_doc/static/präsentation/kion_style/beamertheme.sty View File

@@ -0,0 +1,77 @@
1
+% Copyright 2007 by Till Tantau
2
+%
3
+% This file may be distributed and/or modified
4
+%
5
+% 1. under the LaTeX Project Public License and/or
6
+% 2. under the GNU Public License.
7
+%
8
+% See the file doc/licenses/LICENSE for more details.
9
+
10
+\ProvidesPackageRCS $Header: /Users/joseph/Documents/LaTeX/beamer/base/themes/theme/compatibility/beamerthemeshadow.sty,v d02a7cf4d8ae 2010/06/17 09:11:41 rivanvx $
11
+
12
+\usepackage[utf8]{inputenc}
13
+\usepackage{german}
14
+\usepackage{etoolbox}
15
+\usepackage[absolute,overlay]{textpos}
16
+\setlength{\TPHorizModule}{1mm}
17
+\setlength{\TPVertModule}{\TPHorizModule}
18
+
19
+\newif\ifconfidential
20
+\newcommand{\SetConfidential}{\confidentialtrue}
21
+
22
+\mode<presentation>
23
+\logo{\includegraphics[width=12.4cm]{kion_style/kion_header.png}\hspace*{0.1cm}\vspace*{7.65cm}}
24
+\definecolor{MyRed}{RGB}{174,0,85}
25
+\definecolor{MyGrey}{RGB}{56,54,51}
26
+\definecolor{MyBlue}{RGB}{0,135,185}
27
+% MyLight...[i] = My...[i] + (255-My...[i]) * 0.95
28
+\definecolor{MyLightRed}{RGB}{251,242,247}  
29
+\definecolor{MyLightGrey}{RGB}{245,245,244}
30
+\definecolor{MyLightBlue}{RGB}{242,249,252}
31
+
32
+\setbeamercolor{title}{fg=MyRed}
33
+\setbeamercolor{frametitle}{fg=MyRed}
34
+\setbeamercolor{structure}{fg=MyRed}
35
+\useinnertheme[shadow=true]{rounded}
36
+
37
+\setbeamertemplate{blocks}[rounded][shadow=true]
38
+
39
+\setbeamercolor{block title}{fg=white,bg=MyGrey}
40
+\setbeamercolor{block body}{bg=MyLightGrey}
41
+\AtBeginEnvironment{block}{\setbeamercolor{item projected}{bg=MyGrey}}
42
+
43
+\setbeamercolor{block title example}{fg=white,bg=MyBlue}
44
+\setbeamercolor{block body example}{bg=MyLightBlue}
45
+\AtBeginEnvironment{exampleblock}{\setbeamercolor{item projected}{bg=MyBlue}}
46
+
47
+\setbeamercolor{block title alerted}{fg=white,bg=MyRed}
48
+\setbeamercolor{block body alerted}{bg=MyLightRed}
49
+\AtBeginEnvironment{alertblock}{\setbeamercolor{item projected}{bg=MyRed}}
50
+
51
+\beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}
52
+\beamertemplatenavigationsymbolsempty
53
+\setbeamertemplate{footline}[text line]{%
54
+\parbox{\linewidth}{\vspace*{-8pt}\textcolor{MyRed}{\inserttitle\hfill\insertshortauthor}}}
55
+\renewcommand{\titlepage}[0]{
56
+\begin{textblock}{125}(2,20)
57
+\includegraphics[width=12.4cm]{kion_style/kion_title_page}
58
+\end{textblock}
59
+\begin{textblock}{90}(20,25)
60
+\inserttitle\\\textcolor{MyRed}{\insertsubtitle}
61
+\end{textblock}
62
+\begin{textblock}{90}(20,45)
63
+{\scriptsize\insertauthor}\\{\scriptsize\insertdate}
64
+\end{textblock}
65
+\ifconfidential
66
+\begin{textblock}{120}(4,72)
67
+\scriptsize
68
+\textcolor{MyRed}{Dieses Dokument und dessen Inhalt ist vertraulich und darf
69
+ohne Einverständnis von LMH/ ELE2 weder vollständig noch teilweise
70
+weitergegeben werden.}\\[3pt] \textcolor{MyRed}{This document and it's content
71
+is confidential. It is not allowed to pass it fully or partially without agreement of
72
+LMH/ ELE2.}
73
+\end{textblock}
74
+\fi
75
+}
76
+\mode
77
+<all>

BIN
latex_doc/static/präsentation/kion_style/kion_header.png View File


BIN
latex_doc/static/präsentation/kion_style/kion_title_page.png View File


+ 79
- 0
latex_doc/static/präsentation/linde_style/beamertheme.sty View File

@@ -0,0 +1,79 @@
1
+% Copyright 2007 by Till Tantau
2
+%
3
+% This file may be distributed and/or modified
4
+%
5
+% 1. under the LaTeX Project Public License and/or
6
+% 2. under the GNU Public License.
7
+%
8
+% See the file doc/licenses/LICENSE for more details.
9
+
10
+\ProvidesPackageRCS $Header: /Users/joseph/Documents/LaTeX/beamer/base/themes/theme/compatibility/beamerthemeshadow.sty,v d02a7cf4d8ae 2010/06/17 09:11:41 rivanvx $
11
+
12
+\usepackage[utf8]{inputenc}
13
+\usepackage{german}
14
+\usepackage{etoolbox}
15
+\usepackage[absolute,overlay]{textpos}
16
+\setlength{\TPHorizModule}{1mm}
17
+\setlength{\TPVertModule}{\TPHorizModule}
18
+
19
+\newif\ifconfidential
20
+\newcommand{\SetConfidential}{\confidentialtrue}
21
+
22
+\mode<presentation>
23
+\logo{\includegraphics[width=12.4cm]{linde_style/linde_header.png}\hspace*{0.1cm}\vspace*{7.65cm}}
24
+
25
+\definecolor{MyRed}{RGB}{160,0,32}
26
+\definecolor{MyGrey}{RGB}{18,27,39}
27
+\definecolor{MyBlue}{RGB}{99,137,149}
28
+% MyLight...[i] = My...[i] + (255-My...[i]) * 0.95
29
+\definecolor{MyLightRed}{RGB}{250,242,244}  
30
+\definecolor{MyLightGrey}{RGB}{243,244,244}
31
+\definecolor{MyLightBlue}{RGB}{247,249,250}
32
+
33
+
34
+\setbeamercolor{title}{fg=MyRed}
35
+\setbeamercolor{frametitle}{fg=black}
36
+\setbeamercolor{structure}{fg=MyRed}
37
+
38
+\useinnertheme[shadow=true]{rounded}
39
+\setbeamertemplate{blocks}[rounded][shadow=true]
40
+
41
+\setbeamercolor{block title}{fg=white,bg=MyGrey}
42
+\setbeamercolor{block body}{bg=MyLightGrey}
43
+\AtBeginEnvironment{block}{\setbeamercolor{item projected}{bg=MyGrey}}
44
+
45
+\setbeamercolor{block title example}{fg=white,bg=MyBlue}
46
+\setbeamercolor{block body example}{bg=MyLightBlue}
47
+\AtBeginEnvironment{exampleblock}{\setbeamercolor{item projected}{bg=MyBlue}}
48
+
49
+\setbeamercolor{block title alerted}{fg=white,bg=MyRed}
50
+\setbeamercolor{block body alerted}{bg=MyLightRed}
51
+\AtBeginEnvironment{alertblock}{\setbeamercolor{item projected}{bg=MyRed}}
52
+
53
+\beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}
54
+\beamertemplatenavigationsymbolsempty
55
+\setbeamertemplate{footline}[text line]{%
56
+\parbox{\linewidth}{\vspace*{-8pt}\textcolor{MyRed}{\inserttitle\hfill\insertshortauthor}}}
57
+\renewcommand{\titlepage}[0]{
58
+\begin{textblock}{125}(0,0)
59
+\includegraphics[width=12.8cm]{linde_style/linde_title_page}
60
+\end{textblock}
61
+\begin{textblock}{59}(66,34)
62
+\textcolor{white}{\inserttitle}\\\scriptsize\textcolor{MyGrey}{\insertsubtitle}
63
+\end{textblock}
64
+\begin{textblock}{59}(66,75)
65
+\scriptsize\insertauthor\\\insertdate
66
+\end{textblock}
67
+\ifconfidential
68
+\begin{textblock}{59}(3,60)
69
+\scriptsize
70
+\textcolor{MyRed}{Dieses Dokument und dessen Inhalt ist vertraulich und darf
71
+ohne Einverständnis von LMH/ ELE2 weder vollständig noch teilweise
72
+weitergegeben werden.}\\[6pt] \textcolor{MyRed}{This document and it's content
73
+is confidential. It is not allowed to pass it fully or partially without
74
+agreement of LMH/ ELE2.}
75
+\end{textblock}
76
+\fi
77
+}
78
+\mode
79
+<all>

BIN
latex_doc/static/präsentation/linde_style/linde_header.png View File


BIN
latex_doc/static/präsentation/linde_style/linde_title_page.png View File


+ 82
- 0
latex_doc/templates/brief.tex View File

@@ -0,0 +1,82 @@
1
+\documentclass[12pt,german]{g-brief}
2
+
3
+\usepackage[utf8]{inputenc}
4
+\usepackage{eso-pic} %% AddtoShipPicture nutzen
5
+\usepackage{url}
6
+\usepackage{eurosym}
7
+\usepackage{booktabs}
8
+\usepackage{xcolor}
9
+
10
+\def\blztext{{\footnotesize BIC:}}
11
+\def\kontotext{{\footnotesize IBAN:}}
12
+\renewcommand{\familydefault}{\sfdefault}
13
+%\usepackage{helvet}
14
+\usepackage{avant}
15
+
16
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
17
+%%%  Daten zur eigenen Person   %%%
18
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19
+
20
+%\unserzeichen
21
+\trennlinien
22
+%\fenstermarken
23
+%\lochermarke
24
+\faltmarken
25
+%\klassisch
26
+
27
+\Name                {Dirk Alders}
28
+\Strasse             {Am Spottenberg 7a}
29
+\Zusatz              {}
30
+\Ort                 {63834 Sulzbach}
31
+\Land                {}
32
+\RetourAdresse       {\sf\name\ $\cdot$\ \strasse\ $\cdot$\ \ort} % einzeilig f¨ur Ihre Adresse im Sichtfenster;
33
+\Unterschrift        {Dirk Alders}
34
+\Datum               {\VAR{short_date}}
35
+
36
+\Telefon             {06028/\,40\,70\,41}
37
+%\Telefax             {}
38
+%\HTTP                {http://mount-mockery.de}
39
+\EMail               {dirk@mount-mockery.de}
40
+
41
+%\Bank                {Sparkasse Miltenberg Obernburg}
42
+%\BLZ                 {BYLADEM1MIL}
43
+%\Konto               {DE98\,7965\,0000\,0500\,7933\,93}
44
+
45
+
46
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
47
+%%%  Daten des jeweiligen Briefes, müssen jedesmal geändert werden  %%%
48
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
49
+
50
+\Postvermerk         {} % Einschreiben, Drucksache, etc.
51
+\Adresse             {Adressat\\
52
+	                  Straße Nummer\\[4pt]
53
+	                  PLZ Ort}
54
+\Betreff             {Betreff}
55
+\Anrede              {Sehr geehrte Damen und Herren,}
56
+\Gruss               {Mit freundlichen Grüßen}{1cm}
57
+
58
+
59
+%\Anlagen             {\begin{tabular}[t]{lp{439.4pt}}
60
+%                        $\bullet$ & Test1\\
61
+%                        $\bullet$ & Test2\\
62
+%                      \end{tabular}
63
+%                     }
64
+%\Verteiler           {
65
+%                     }
66
+%\MeinZeichen         {\tiny\url{\VAR{full_folder}}}
67
+%\IhrZeichen          {Zeichen}
68
+%\IhrSchreiben        {dd.mm.yyyy}
69
+
70
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
71
+%%%  der eigentliche Text des Briefes  %%%
72
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
73
+
74
+\begin{document}
75
+  \ClearShipoutPicture
76
+  \AddToShipoutPicture{\put(50,40){\tiny\url{\VAR{full_folder}}}}
77
+  \begin{g-brief}
78
+
79
+    Brieftext.
80
+
81
+  \end{g-brief}
82
+\end{document}

+ 99
- 0
latex_doc/templates/merkblatt.tex View File

@@ -0,0 +1,99 @@
1
+\documentclass[10pt, a4paper,oneside]{article}
2
+
3
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4
+% alle benötigten Pakete werden hier eingebunden
5
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
6
+
7
+\usepackage{german}
8
+\usepackage[utf8]{inputenc} %Damit man ohne Probleme Umlaute eingeben kann
9
+\usepackage{fancyhdr}
10
+\usepackage{eso-pic} %% AddtoShipPicture nutzen
11
+\usepackage{booktabs}
12
+\usepackage{xcolor}
13
+\usepackage{longtable}
14
+\usepackage{graphicx}
15
+\usepackage{longtable} %lange Tabellen über mehrere Seiten erstellen
16
+\usepackage{lastpage}
17
+\usepackage{url}
18
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
19
+% Selbst definierte Style-Dateien
20
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
21
+\newenvironment{blatt}[2]
22
+{
23
+  \ClearShipoutPicture
24
+  \AddToShipoutPicture{
25
+    \renewcommand{\headrulewidth}{0.0pt}
26
+    \renewcommand{\footrulewidth}{0.0pt}
27
+    \thicklines
28
+    \put(60,52){\framebox(480,735){}}
29
+    \put(49,76){\rotatebox{90}{\makebox(100,7)[l]{\scriptsize\url{\VAR{full_path}}}}}
30
+    \put(545,104){\rotatebox{90}{\makebox(100,22)[l]{\bfseries #1\,(\thepage/\,\pageref{LastPage})}}}
31
+    \put(545,76){\includegraphics[height=20pt]{icons/#2}}
32
+    \put(75,40){\makebox(100,7)[l]{\scriptsize \today }}
33
+  }
34
+}
35
+{
36
+  \newpage
37
+}
38
+
39
+
40
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
+% Einzug verändert und größerer Zeilenabstand
42
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
43
+\parindent0.0em                        % 1. Zeile nicht einrücken
44
+
45
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
46
+% Schriftart
47
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
48
+\renewcommand\familydefault{\sfdefault}
49
+
50
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
51
+% Abstände
52
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
53
+\pagestyle{empty}
54
+% Größe des Textbereiches in der Seite
55
+\setlength{\textwidth}{16.4cm}
56
+\setlength{\textheight}{24.5cm}
57
+% Kopf- und Fußzeile, Höhe und Abstand vom Text
58
+\setlength{\headheight}{0pt}
59
+\setlength{\headsep}{0pt}
60
+\setlength{\topmargin}{-1cm}
61
+% Linker Seiteneinzug
62
+\setlength{\oddsidemargin}{2.35cm} \addtolength{\oddsidemargin}{-1in}
63
+\setlength{\evensidemargin}{2.35cm} \addtolength{\evensidemargin}{-1in}
64
+\addtolength{\topmargin}{1.1cm}
65
+
66
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
67
+% Überschriftformatierung
68
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
69
+\usepackage{titlesec}
70
+\titleformat{name=\section}[block]
71
+  {\large}
72
+  {}
73
+  {0pt}
74
+  {\colorsection}
75
+\titlespacing*{\section}{0pt}{\baselineskip}{\baselineskip}
76
+
77
+\newcommand{\colorsection}[1]{%
78
+	\colorbox{black!25}{\parbox{\dimexpr\textwidth-2\fboxsep}{\bf #1}}}
79
+
80
+\titleformat{name=\subsection}[block]
81
+{\large}
82
+{}
83
+{0pt}
84
+{\colorsubsection}
85
+\titlespacing*{\subsection}{0pt}{\baselineskip}{\baselineskip}
86
+
87
+\newcommand{\colorsubsection}[1]{%
88
+	\colorbox{black!10}{\parbox{\dimexpr\textwidth-2\fboxsep}{#1}}}
89
+
90
+
91
+\begin{document}
92
+%Schriftart setzen
93
+
94
+\begin{blatt}{Titel des Dokuments}{info}  % Possible Icons: folie, info, merk, station
95
+	\section{Überschrift}
96
+	Text
97
+\end{blatt}
98
+
99
+\end{document}

+ 173
- 0
latex_doc/templates/präsentation.tex View File

@@ -0,0 +1,173 @@
1
+\documentclass{beamer}
2
+%\documentclass[handout]{beamer}
3
+
4
+%%% Deutsche Beschriftungen
5
+\usepackage[utf8]{inputenc}
6
+\usepackage{german}
7
+
8
+\definecolor{links}{HTML}{2A1B81}
9
+\hypersetup{colorlinks,linkcolor=,urlcolor=links}
10
+
11
+\usepackage{beamerthemeshadow}
12
+%\usepackage{my_style/beamertheme}
13
+\beamersetuncovermixins{\opaqueness<1>{25}}{\opaqueness<2->{15}}
14
+
15
+\usepackage{multicol}
16
+
17
+
18
+\begin{document}
19
+\title{Präsentationstitel}
20
+\author{Vorname Nachname}
21
+\date{\today} 
22
+
23
+\frame{\titlepage} 
24
+
25
+\frame{\frametitle{Table of contents}\tableofcontents} 
26
+
27
+
28
+\section{Section no.1} 
29
+\frame{\frametitle{Title} 
30
+Each frame should have a title.
31
+}
32
+\subsection{Subsection no.1.1  }
33
+\frame{ 
34
+Without title somethink is missing. 
35
+}
36
+
37
+
38
+\section{Section no. 2} 
39
+\subsection{Lists I}
40
+\frame{\frametitle{unnumbered lists}
41
+\begin{itemize}
42
+\item Introduction to  \LaTeX  
43
+\item Course 2 
44
+\item Termpapers and presentations with \LaTeX 
45
+\item Beamer class
46
+\end{itemize} 
47
+}
48
+
49
+\frame{\frametitle{lists with pause}
50
+\begin{itemize}
51
+\item Introduction to  \LaTeX \pause 
52
+\item Course 2 \pause 
53
+\item Termpapers and presentations with \LaTeX \pause 
54
+\item Beamer class
55
+\end{itemize} 
56
+}
57
+
58
+\subsection{Lists II}
59
+\frame{\frametitle{numbered lists}
60
+\begin{enumerate}
61
+\item Introduction to  \LaTeX  
62
+\item Course 2 
63
+\item Termpapers and presentations with \LaTeX 
64
+\item Beamer class
65
+\end{enumerate}
66
+}
67
+\frame{\frametitle{numbered lists with pause}
68
+\begin{enumerate}
69
+\item Introduction to  \LaTeX \pause 
70
+\item Course 2 \pause 
71
+\item Termpapers and presentations with \LaTeX \pause 
72
+\item Beamer class
73
+\end{enumerate}
74
+}
75
+
76
+\section{Section no.3} 
77
+\subsection{Tables}
78
+\frame{\frametitle{Tables}
79
+\begin{tabular}{|c|c|c|}
80
+\hline
81
+\textbf{Date} & \textbf{Instructor} & \textbf{Title} \\
82
+\hline
83
+WS 04/05 & Sascha Frank & First steps with  \LaTeX  \\
84
+\hline
85
+SS 05 & Sascha Frank & \LaTeX \ Course serial \\
86
+\hline
87
+\end{tabular}}
88
+
89
+
90
+\frame{\frametitle{Tables with pause}
91
+\begin{tabular}{c c c}
92
+A & B & C \\ 
93
+\pause 
94
+1 & 2 & 3 \\  
95
+\pause 
96
+A & B & C \\ 
97
+\end{tabular} }
98
+
99
+
100
+\section{Section no. 4}
101
+\subsection{blocs}
102
+\frame{\frametitle{blocs}
103
+
104
+\begin{block}{title of the bloc}
105
+bloc text
106
+\end{block}
107
+
108
+\begin{exampleblock}{title of the bloc}
109
+bloc text
110
+\end{exampleblock}
111
+
112
+
113
+\begin{alertblock}{title of the bloc}
114
+bloc text
115
+\end{alertblock}
116
+}
117
+
118
+\section{Section no. 5}
119
+\subsection{split screen}
120
+
121
+\frame{\frametitle{splitting screen}
122
+\begin{columns}
123
+\begin{column}{5cm}
124
+\begin{itemize}
125
+\item Beamer 
126
+\item Beamer Class 
127
+\item Beamer Class Latex 
128
+\end{itemize}
129
+\end{column}
130
+\begin{column}{5cm}
131
+\begin{tabular}{|c|c|}
132
+\hline
133
+\textbf{Instructor} & \textbf{Title} \\
134
+\hline
135
+Sascha Frank &  \LaTeX \ Course 1 \\
136
+\hline
137
+Sascha Frank &  Course serial  \\
138
+\hline
139
+\end{tabular}
140
+\end{column}
141
+\end{columns}
142
+}
143
+
144
+\subsection{Pictures} 
145
+\frame{\frametitle{pictures in latex beamer class}
146
+\begin{figure}
147
+\includegraphics[scale=0.5]{PIC1} 
148
+\caption{show an example picture}
149
+\end{figure}}
150
+
151
+\subsection{joining picture and lists} 
152
+
153
+\frame{
154
+\frametitle{pictures and lists in beamer class}
155
+\begin{columns}
156
+\begin{column}{5cm}
157
+\begin{itemize}
158
+\item<1-> subject 1
159
+\item<3-> subject 2
160
+\item<5-> subject 3
161
+\end{itemize}
162
+\vspace{3cm} 
163
+\end{column}
164
+\begin{column}{5cm}
165
+\begin{overprint}
166
+\includegraphics<2>{PIC1}
167
+\includegraphics<4>{PIC2}
168
+\includegraphics<6>{PIC3}
169
+\end{overprint}
170
+\end{column}
171
+\end{columns}}
172
+
173
+\end{document}

+ 3
- 0
leyk View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+python3 ~/prj/clients/leyk/tcp_client.py

+ 88
- 0
mkdoc View File

@@ -0,0 +1,88 @@
1
+#!/usr/bin/env python
2
+# -*- coding: UTF-8 -*-
3
+
4
+import jinja2
5
+import optparse
6
+import os
7
+import shutil
8
+import time
9
+
10
+
11
+TYPES = [u'brief', u'merkblatt', u'präsentation']
12
+TARGET_EXTENTION = u'.tex'
13
+
14
+
15
+def mkdir(path):
16
+    """.. warning:: Needs to be documented
17
+    """
18
+    path=os.path.abspath(path)
19
+    if not os.path.exists(os.path.dirname(path)):
20
+        mkdir(os.path.dirname(path))
21
+    if not os.path.exists(path):
22
+        os.mkdir(path)
23
+    return os.path.isdir(path)
24
+
25
+
26
+def get_path_replace_list():
27
+    HOME_PATH_REPLACEMENT = '~'
28
+    rv = []
29
+    home_path = os.getenv("HOME")
30
+    rv.append( (home_path, HOME_PATH_REPLACEMENT) )
31
+    for p in os.listdir(home_path):
32
+        full_path = os.path.join(home_path, p)
33
+        if os.path.islink(full_path):
34
+            rv.append( (os.path.realpath(full_path), os.path.join(HOME_PATH_REPLACEMENT, p)) )
35
+    return rv
36
+
37
+
38
+template_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'latex_doc', 'templates')
39
+static_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'latex_doc', 'static')
40
+
41
+
42
+if __name__ == "__main__":
43
+    parser = optparse.OptionParser("usage: %%prog [options] folder_for_document")
44
+    parser.add_option("-t", "--type", dest="type", default=None, type="string", help="|".join(TYPES))
45
+    parser.add_option("-f", "--force", dest="force", action="store_true", default=False)
46
+    (options, args) = parser.parse_args()
47
+    if len(args) != 1 or options.type is None or options.type not in TYPES:
48
+        parser.print_help()
49
+    else:
50
+        target_file = os.path.join(os.path.abspath('.'), args[0])
51
+        if not target_file.endswith(TARGET_EXTENTION):
52
+            target_file = os.path.join(target_file, os.path.basename(target_file) + TARGET_EXTENTION)
53
+        full_path = target_file
54
+        for original, replacement in get_path_replace_list():
55
+            if full_path.startswith(original):
56
+                full_path = replacement + full_path[len(original):]
57
+                break
58
+        full_folder = os.path.dirname(full_path)
59
+        filename = os.path.splitext(os.path.basename(target_file))[0]
60
+        short_date = time.strftime('%d.%m.%Y')
61
+        #
62
+        # Main Actions
63
+        #
64
+        latex_jinja_env = jinja2.Environment(
65
+            block_start_string = '\BLOCK{',
66
+            block_end_string = '}',
67
+            variable_start_string = '\VAR{',
68
+            variable_end_string = '}',
69
+            comment_start_string = '\#{',
70
+            comment_end_string = '}',
71
+            line_statement_prefix = '%_',
72
+            line_comment_prefix = '%#',
73
+            trim_blocks = True,
74
+            autoescape = False,
75
+            loader = jinja2.FileSystemLoader(template_path)
76
+        )
77
+        if not os.path.exists(target_file) or options.force:
78
+            mkdir(os.path.dirname(target_file))
79
+            with open(target_file, 'w') as fh:
80
+                fh.write(latex_jinja_env.get_template(options.type + TARGET_EXTENTION).render(
81
+                    full_path=full_path, 
82
+                    full_folder=full_folder, 
83
+                    filename=filename, 
84
+                    short_date=short_date).encode('UTF-8'))
85
+            if options.type == 'merkblatt':
86
+                shutil.copytree(os.path.join(static_path, options.type), os.path.join(os.path.dirname(target_file), 'icons'))
87
+        else:
88
+            print("File exists. Use option -f to create file")

+ 158
- 0
mkunittest View File

@@ -0,0 +1,158 @@
1
+#!/usr/bin/env python
2
+# -*- coding: UTF-8 -*-
3
+
4
+import os
5
+import stat
6
+
7
+name = os.path.basename(os.path.abspath('.'))
8
+
9
+gitignore = """# general stuff
10
+*~
11
+unittest/testresults/*
12
+unittest/output_data/*
13
+
14
+# eclipse stuff
15
+.settings/
16
+
17
+# Byte-compiled / optimized / DLL files
18
+__pycache__/
19
+*.py[cod]
20
+
21
+# C extensions
22
+*.so
23
+
24
+# Distribution / packaging
25
+.Python
26
+env/
27
+build/
28
+develop-eggs/
29
+dist/
30
+downloads/
31
+eggs/
32
+.eggs/
33
+lib/
34
+lib64/
35
+parts/
36
+sdist/
37
+var/
38
+*.egg-info/
39
+.installed.cfg
40
+*.egg
41
+
42
+# PyInstaller
43
+#  Usually these files are written by a python script from a template
44
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
45
+*.manifest
46
+*.spec
47
+
48
+# Installer logs
49
+pip-log.txt
50
+pip-delete-this-directory.txt
51
+
52
+# Unit test / coverage reports
53
+htmlcov/
54
+.tox/
55
+.coverage
56
+.coverage.*
57
+.cache
58
+nosetests.xml
59
+coverage.xml
60
+*,cover
61
+
62
+# Translations
63
+*.mo
64
+*.pot
65
+
66
+# Django stuff:
67
+*.log
68
+
69
+# Sphinx documentation
70
+docs/_build/
71
+
72
+# PyBuilder
73
+target/
74
+"""
75
+
76
+unittest_py = """#!/usr/bin/env python
77
+# -*- coding: utf-8 -*-
78
+#
79
+
80
+import optparse
81
+import os
82
+import report
83
+import unittest
84
+import tests
85
+
86
+parser = optparse.OptionParser("usage: %prog [clean|run|coverage|pdf|copy|release]")
87
+parser.add_option("-e", "--execution-level", dest="execution_level", default="full", help="sets the execution level [full | short | smoke | single]")
88
+(options, args) = parser.parse_args()
89
+
90
+
91
+if report.TCEL_REVERSE_NAMED.get(tests.execution_level, report.TCEL_FULL) < report.TCEL_REVERSE_NAMED.get(options.execution_level, report.TCEL_FULL):
92
+    options.execution_level = tests.execution_level
93
+
94
+unittest.run.unittest(options, args, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
95
+"""
96
+
97
+config_py = """#!/usr/bin/env python
98
+# -*- coding: UTF-8 -*-
99
+
100
+import optparse
101
+import os
102
+import %s as lib
103
+
104
+release_unittest_version = 'xxx'
105
+lib_path = os.path.realpath(lib.__path__[0])
106
+additional_loggers_to_catch = []
107
+
108
+if __name__ == "__main__":
109
+    parser = optparse.OptionParser("usage: %%prog [options] folder_for_document")
110
+    parser.add_option("-p", "--path", dest="libpath", action="store_true", default=False, help="prints the library path")
111
+    (options, args) = parser.parse_args()
112
+
113
+    if options.libpath:
114
+        print(lib_path)
115
+""" % name
116
+
117
+test_init_py = """#!/usr/bin/env python
118
+# -*- coding: UTF-8 -*-
119
+
120
+import %s
121
+
122
+from report import TCEL_FULL
123
+from report import TCEL_SHORT
124
+from report import TCEL_SINGLE
125
+from report import TCEL_SMOKE
126
+
127
+#from tests import test_
128
+
129
+execution_level = 'full'
130
+
131
+def testrun(tcl):
132
+    #
133
+    # caching.property_cache_json
134
+    #
135
+    tcl.testCase('description', TCEL_FULL, test_.func, *args, **kwargs)
136
+""" % name
137
+with open('.gitignore', 'w') as fh:
138
+    fh.write(gitignore)
139
+os.mkdir('docs')
140
+os.mkdir('examples')
141
+os.symlink('../pylibs/%s' % name, 'examples/%s' % name)
142
+os.mkdir('pylibs')
143
+os.mkdir('requirements')
144
+os.mkdir('unittest')
145
+os.symlink('../pylibs/unittest/unittest_flow.sh', 'unittest/unittest.sh')
146
+os.mkdir('unittest/input_data')
147
+os.mkdir('unittest/output_data')
148
+os.mkdir('unittest/src')
149
+with open('unittest/src/config.py', 'w') as fh:
150
+    fh.write(config_py)
151
+with open('unittest/src/unittest.py', 'w') as fh:
152
+    fh.write(unittest_py)
153
+for lib_name in [name, 'report', 'unittest', 'fstools', 'reqif']:
154
+    os.symlink('../../pylibs/%s' % lib_name, 'unittest/src/%s' % lib_name)
155
+os.mkdir('unittest/src/tests')
156
+with open('unittest/src/tests/__init__.py', 'w') as fh:
157
+    fh.write(test_init_py)
158
+

+ 15
- 0
nemo-terminal-settings View File

@@ -0,0 +1,15 @@
1
+#!/bin/sh
2
+#
3
+#######################################################################################
4
+# See /usr/share/glib-2.0/schemas/org.nemo.extensions.nemo-terminal.gschema.xml
5
+# for more information
6
+#######################################################################################
7
+
8
+
9
+#	<enum id="org.nemo.extensions.nemo-terminal.TerminalPosition">
10
+#	    <value value="0" nick="top"/>
11
+#	    <value value="1" nick="bottom"/>
12
+#	</enum>
13
+gsettings set org.nemo.extensions.nemo-terminal terminal-position 'top'
14
+
15
+gsettings set org.nemo.extensions.nemo-terminal default-terminal-height '12'

+ 9
- 0
terminal_exec View File

@@ -0,0 +1,9 @@
1
+#!/bin/sh
2
+#
3
+if ! gnome-terminal -- $*; then
4
+    if ! konsole -e $*; then
5
+        if ! xfce4-terminal -e $*; then
6
+            $*
7
+        fi
8
+    fi
9
+fi

+ 3
- 0
tmux_local View File

@@ -0,0 +1,3 @@
1
+#!/bin/sh
2
+#
3
+tmux attach-session -t local || tmux new-session -s local

+ 1
- 0
wav2mp3 View File

@@ -0,0 +1 @@
1
+lame -V 0 -F -h -b 160 $1 $2

BIN
wdfs View File


+ 18
- 0
wma2mp3 View File

@@ -0,0 +1,18 @@
1
+#!/bin/bash
2
+
3
+# Dump wma to mp3
4
+# from http://ocaoimh.ie/2005/08/16/how-to-convert-from-wma-to-mp3/
5
+
6
+for src in *.wma
7
+do
8
+  if [ -f "$src" ]
9
+  then
10
+    fifo=`echo "$src"|sed -e 's/wma$/wav/'`
11
+    rm -f "$fifo"
12
+    mkfifo "$fifo"
13
+    mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader "$src" -ao pcm:file="$fifo" &
14
+    dest=`echo "$src"|sed -e 's/wma$/mp3/'`
15
+    lame --vbr-new "$fifo" "$dest"
16
+    rm -f "$fifo"
17
+  fi
18
+done

Loading…
Cancel
Save