# HowTos on Minimal Setups

http://172.16.3.33:1313/howtos/ Recent content in HowTos on Minimal Setups Hugo en-us

# Colors in Minicom

http://172.16.3.33:1313/howtos/colors-in-minicom/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/colors-in-minicom/ <p>To start <code>minicom</code> in color mode use</p> <pre tabindex="0"><code>minicom -c on </code></pre><p>Switch terminal emulation to ANSI.</p> <p>Use escape sequences to actually change the color of text as described for instance here</p> <p><a href="https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html">https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html</a>.</p> <p>The base sequence is <code>\1b[Xm</code> where X is a number as described below.</p> <p>To get the colors in bright style, use the sequence <code>\x1b[X;1m</code>.</p> <table> <thead> <tr> <th>Number</th> <th>Color</th> </tr> </thead> <tbody> <tr> <td>0</td> <td>reset</td> </tr> <tr> <td>1</td> <td>highlight</td> </tr> <tr> <td>7</td> <td>inverse</td> </tr> <tr> <td>30</td> <td>black</td> </tr> <tr> <td>31</td> <td>red</td> </tr> <tr> <td>32</td> <td>green</td> </tr> <tr> <td>33</td> <td>yellow</td> </tr> <tr> <td>34</td> <td>blue</td> </tr> <tr> <td>35</td> <td>magenta</td> </tr> <tr> <td>36</td> <td>cyan</td> </tr> <tr> <td>37</td> <td>white</td> </tr> </tbody> </table>

# Engel des Herrn

http://172.16.3.33:1313/howtos/engel-des-herrn/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/engel-des-herrn/ <p>Der Engel des Herrn brachte Maria die Botschaft, und sie empfing vom Heiligen Geist. Gegrüßet seist du, Maria …</p> <p>Maria sprach: Siehe, ich bin die Magd des Herrn; mir geschehe nach deinem Wort. Gegrüßet seist du, Maria …</p> <p>Und das Wort ist Fleisch geworden und hat unter uns gewohnt. Gegrüßet seist du, Maria …</p> <p>Bitte für uns, heilige Gottesmutter (heilige Gottesgebärerin), (auf) dass wir würdig werden der Verheißungen Christi.</p> <p>Lasset uns beten. Allmächtiger Gott, gieße deine Gnade in unsere Herzen ein. Durch die Botschaft des Engels haben wir die Menschwerdung Christi, deines Sohnes, erkannt. Führe uns durch sein Leiden und Kreuz zur Herrlichkeit der Auferstehung. Darum bitten wir durch Christus, unsern Herrn. Amen.</p>

# Execute occ in Nextcloud pod

http://172.16.3.33:1313/howtos/occ-in-nextcloud-pod/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/occ-in-nextcloud-pod/ <p>First, look up the name of the pod using</p> <pre tabindex="0"><code>kubectl get pods -n nextcloud </code></pre><p>Then, get into the pod using</p> <pre tabindex="0"><code>kubectl exec --stdin --tty NAME_OF_THE_POD -c nextcloud -n nextcloud -- sh </code></pre><p>Finally, within the pod</p> <pre tabindex="0"><code>su -s /bin/sh www-data -c &#34;php occ --help&#34; </code></pre>

# Gitlab Backup and Restore

http://172.16.3.33:1313/howtos/gitlab-backup/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/gitlab-backup/ <h2 id="backup">Backup</h2> <p>Find the backup directory:</p> <pre tabindex="0"><code>grep backup_path /etc/gitlab/gitlab.rb </code></pre><p>Issue backup:</p> <pre tabindex="0"><code>sudo gitlab-backup create </code></pre><p>Transfer backup using scp to destination machine.</p> <p>Backup configuration and secrets:</p> <pre tabindex="0"><code>sudp cp /etc/gitlab/gitlab-secrets.json /backuppath/ sudo cp /etc/gitlab/gitlab.rb /backuppath/ </code></pre><h2 id="restore">Restore</h2> <p>See also here: <a href="https://docs.gitlab.com/ee/administration/backup_restore/restore_gitlab.html">https://docs.gitlab.com/ee/administration/backup_restore/restore_gitlab.html</a></p> <p><em>DO NOT OVERWRITE THE CONFIGURATION ON THE DESTINATION MACHINE. COMPARE IT AND CONSIDER AND EVALUATE EACH DIFFERENCE</em></p> <p>Stop processes of GitLab connecting to the database:</p> <pre tabindex="0"><code>gitlab-ctl stop puma gitlab-ctl stop sidekiq # check gitlab-ctl status </code></pre><p>Do not stop the whole system since the restore tool has to connect to the database which would also stop in that case.</p>

# Gitlab Change BaseURL in Database

http://172.16.3.33:1313/howtos/gitlab-change-baseurl/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/gitlab-change-baseurl/ <h2 id="change-url">Change URL</h2> <p>After a migration changing the base url in the configuration is not enough. It must also be changed in the database.</p> <ul> <li>Adjust the variable <code>external_url</code> in the file <code>/etc/gitlab/gitlab.rb</code> and run <code>gitlab-ctl reconfigure</code></li> <li>Adjust the canonical URL in the database: <pre tabindex="0"><code>gitlab-rails console ApplicationSetting.current.update!(home_page_url: &#39;https://neue-url.example.com&#39;) ApplicationSetting.current.update!(after_sign_out_path: &#39;https://neue-url.example.com&#39;) </code></pre></li> <li>Reading out a value from the ApplicationSetting via the gitlab-rails console is done using <pre tabindex="0"><code>ApplicationSetting.current.home_page_url </code></pre></li> <li>Clear the internal cache: <pre tabindex="0"><code>gitlab-rake cache:clear </code></pre></li> </ul>

# Gitlab Upgrades

http://172.16.3.33:1313/howtos/gitlab-upgrades/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/gitlab-upgrades/ <h2 id="upgrade-of-a-gitlab-instance">Upgrade of a GitLab instance</h2> <p>When upgrading a Gitlab instance, strictly follow the defined upgrade path. Consider to snapshot the filesystem if possible after each step.</p> <p>Additional, after each step wait until all background migrations are completed before performing the next upgrade step.</p> <ul> <li><a href="https://docs.gitlab.com/ee/update/index.html#upgrade-paths">Upgrade Paths</a></li> <li><a href="https://docs.gitlab.com/ee/update/package/#upgrade-to-a-specific-version-using-the-official-repositories">Upgrading to a specific version</a></li> </ul> <p>To find the versions of a specific package in the Debian apt cache use</p> <pre tabindex="0"><code> apt-cache madison gitlab-ce </code></pre><p>To upgrade to a specific version use</p>

# How to add a CA certificate in Debian

http://172.16.3.33:1313/howtos/ca-certificate-in-debian/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/ca-certificate-in-debian/ <p>Copy CA file with extension <code>crt</code> into <code>/usr/local/share/ca-certificates/</code>.</p> <p>Call <code>update-ca-certificates</code> as root.</p>

# iSCSI on Linux

http://172.16.3.33:1313/howtos/iscsi-on-linux/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/iscsi-on-linux/ <h2 id="preparation">Preparation</h2> <p>Install <code>open-iscsi</code>, at least on Debian systems.</p> <h2 id="use-an-iscsi-target-from-linux">Use an iSCSI target from Linux</h2> <p>In our setup a Synology NAS at 172.16.200.19 provides the targets.</p> <p>First, run</p> <pre tabindex="0"><code> iscsiadm -m discovery -t sendtargets -p 172.16.200.19 </code></pre><p>to discover all provided targets.</p> <p>You get something like this</p> <pre tabindex="0"><code> 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-GitLab.db1c0541e7 [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-GitLab.db1c0541e7 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-Bitwarden.db1c0541e7 [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-Bitwarden.db1c0541e7 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-Nextcloud.db1c0541e7 [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-Nextcloud.db1c0541e7 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-MariaDB.db1c0541e7 [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-MariaDB.db1c0541e7 172.16.200.19:3260,1 iqn.2000-01.com.synology:nas.Target-Backup.db1c0541e7 [fe80::211:32ff:febe:da31]:3260,1 iqn.2000-01.com.synology:nas.Target-Backup.db1c0541e7 </code></pre><p>Now, connect to the target using</p>

# Magnifikat

http://172.16.3.33:1313/howtos/magnifikat/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/magnifikat/ <p>Bibellese zum 15.12.2013</p> <p>1,46 Und Maria sprach: Meine Seele erhebt den Herrn,</p> <p>47 und mein Geist freut sich Gottes, meines Heilandes;</p> <p>48 denn er hat die Niedrigkeit seiner Magd angesehen. Siehe, von nun an werden mich selig preisen alle Kindeskinder.</p> <p>49 Denn er hat große Dinge an mir getan, der da mächtig ist und dessen Name heilig ist.</p> <p>50 Und seine Barmherzigkeit währt von Geschlecht zu Geschlecht bei denen, die ihn fürchten.</p>

# Neovim Setup

http://172.16.3.33:1313/howtos/neovim/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/neovim/ <p>Lots of information on nvim can be found for instance here:</p> <ul> <li><a href="https://programmingpercy.tech/blog/learn-how-to-use-neovim-as-ide/">https://programmingpercy.tech/blog/learn-how-to-use-neovim-as-ide/</a></li> <li><a href="https://github.com/hrsh7th/">https://github.com/hrsh7th/</a></li> <li><a href="https://github.com/wbthomason/packer.nvim">https://github.com/wbthomason/packer.nvim</a></li> <li><a href="https://docs.rockylinux.org/books/nvchad/nvchad_ui/nvimtree/">https://docs.rockylinux.org/books/nvchad/nvchad_ui/nvimtree/</a></li> </ul> <h2 id="installation-of-neovim">Installation of Neovim</h2> <p>On Debian install neovim from the sources, the packages are mostly a bit aged.</p> <div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-shell" data-lang="shell"><span style="display:flex;"><span>git clone https://github.com/neovim/neovim </span></span><span style="display:flex;"><span>sudo apt install ninja-build gettext cmake unzip curl </span></span><span style="display:flex;"><span>make CMAKE_BUILD_TYPE<span style="color:#f92672">=</span>Release </span></span><span style="display:flex;"><span>sudo make install </span></span></code></pre></div><p>On Windows install from binary or using installer, on MacOS use <code>brew</code>.</p> <p>Debian packages can be found here: <a href="https://github.com/neovim/neovim-releases/releases">https://github.com/neovim/neovim-releases/releases</a></p> <h2 id="configuration">Configuration</h2> <p>Clone the packer repository:</p>

# PuTTY and OPENGPG hardware keys

http://172.16.3.33:1313/howtos/putty-and-hardware-keys/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/putty-and-hardware-keys/ <ul> <li>install gpg4win installed</li> <li>create or edit the file <code>gpg-agent.conf</code>, usually in <code>c:\Users\XXX\AppData\Roaming\gnupg\</code>: <pre tabindex="0"><code>enable-putty-support enable-ssh-support use-standard-socket </code></pre></li> </ul>

# Resize HDD on running system

http://172.16.3.33:1313/howtos/resize-hdd-on-running-system/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/resize-hdd-on-running-system/ <ul> <li>Resize target on VMWare or on Synology or where ever it is provided</li> <li>Stop services using the disk</li> <li>Unmount the disk</li> <li>Run <code>e2fsck -f</code> on the disk</li> <li>Rescan disks using <code>echo 1&gt;/sys/class/block/sdx/device/rescan</code> (replace <code>sdx</code> by actual disk device)</li> <li>Extend partition using <code>resize</code> in <code>cfdisk</code></li> <li>Extend filesystem using <code>resize2fs</code> on extended partition</li> <li>Mount the partition</li> <li>Start services</li> </ul>

# snmpwalk with numeric and text output of oid

http://172.16.3.33:1313/howtos/snmpwalk-with-numeric-and-text-output/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/snmpwalk-with-numeric-and-text-output/ <pre tabindex="0"><code>snmpwalk -v 2c -c $COMMUNITY -On $HOST $BASE_OID | while read -r line; do oid=`echo $line | awk &#39;{print $1}&#39;` textoid=`snmptranslate $oid` value=`echo $line | cut -d &#39; &#39; -f 3-` echo &#34;$oid ($textoid): $value&#34; done </code></pre>

# Solution for Prince of Persia 1

http://172.16.3.33:1313/howtos/prince-of-persia-1/ Mon, 01 Jan 0001 00:00:00 +0000 http://172.16.3.33:1313/howtos/prince-of-persia-1/ <h1 id="lösung-prince-of-persia-1">Lösung Prince of Persia 1</h1> <h2 id="komplettlösung-zu-prince-of-persia-1">Komplettlösung zu &ldquo;Prince of Persia 1&rdquo;</h2> <p>Zuallererst mal zur Joysticksteuerung: Wenn Ihr beim<br> Springen den Feuerknopf gedrückt haltet, macht der Prince<br> einen &lsquo;Klammersprung&rsquo;, d.h., bei grossen Entfernungen<br> springt er an die gegenüberliegende Wand und klammert sich<br> dort fest. Mit dem Joystick dann einfach nach oben drücken<br> und schon ist&rsquo;s geschafft.</p> <p>Ausserdem kann man teilweise Decken aufstossen (VORSICHT,<br> wenn die Platten dann runterfallen!); aber dies ist für das<br> Spiel nur dann nötig, wenn man in einer Sackgasse steckt<br> und der Weg über die Decke weitergeht. Ansonsten sind dort<br> meist &rsquo;nur&rsquo; Potions versteckt. ACHTUNG: Um das Spiel<br> zeitlich zu schaffen empfiehlt es sich, (wenn nicht<br> wirklich nötig) die Deckengänge NICHT zu benutzen. Das<br> Spiel an sich verfügt über 13 Level (12 Level + den<br> Abschlußlevel mit Kampf gegen Jaffar). Wenn man alle Level<br> kennt und perfekt spielt (nie kaputt geht) braucht man<br> trotzdem ca. 45-50 min. Um das Spiel also zu schaffen, muß<br> man in allen Leveln den Weg kennen. Da dies natürlich nicht<br> beim erstenmal klappt ist klar; also immer ein bis zwei<br> Level weiterarbeiten und gut auskundschaften.</p>