-
use ansible module copy instead of template for small files
In order to adapt files and their content on target servers I am used to using ansible copy module. However, if you only have a small file with just one or a few lines, you can do so without creating a jinja2 template. Here is the little cheat: Just use ansible’s copy module. That’s it. This creates a file with variable content, without need to create a template.
-
merge particular files in another branch
Every now and then I am faced with the question of how I can transfer individual files from a feature branch. git cherry-pick is intended for taking over the contents of a commit. But if I only want to take over individual files, this tool is probably not the solution. In order not to make it too exciting, here is the simple answer: I want to explain it using a specific example. In the feature branch I have the files iWwantThat.yml and alsoNeeded2.py. To transfer these two files and only these to the main branch, I switch to the main branch and run the git checkout:
-
đź’ˇPowershell Tip – Find all files larger than X bytes in a directory structure
In order to output all files larger than a certain size on Windows systems, you do not have to use the explorer search. A Powershell script does this very efficiently. The result is shown in a gridview window: If the last part | Out-GridView is omitted, the output in the console is required.
-
Convert JSON to YAML and back using python
Just a few lines of code to convert json to yaml and back. Convert JSON to YAML Convert YAML to JSON
-
HTTPS Setup fĂĽr eine Flask Anwendung – Teil 2
Im ersten Teil habe ich die Einrichtung des Ubuntu Servers fĂĽr meine kleine Webanwendung fĂĽr den isländisch Kurs beschrieben. Im zweiten Teil möchte ich kurz auf die HTTPS Einrichtung eingehen. Die DigitalOcean Anleitung fĂĽr Ubuntu 18.04 funktioniert nicht unter Ubunt 20.x. Bitte darauf achren, die Anleitung fĂĽr das eingesetzte Ubuntu Release (hier 20.04) zu verwenden, falls vorhanden. Das verwendete Repository ppa:certbot/certbot ist im Status DEPRECATED. Daher wird der Certbot fĂĽr die Let’s Encrypt Zertifikate Ein Apache Virtual Host ist Vorausssetzung fĂĽr die nächsten Schritte. Die Einrichtung habe ich in Teil 1 beschrieben. HTTPS Zugriff durch die Firewall Der aktuelle Status der Firewall wird mit ufw abgefragt: Um eingehende HTTPS Anfragen…
-
Web Anwendung basierend auf Python Flask – Teil 3
Der dritte Teil beschreibt die Webanwendung meines Isländisch Trainers. Ich habe den Quellcode auf Gihub veröffentlicht. Der hauptteil der Anwendung besteht aus 2 Webseiten. Die erste eröffnet eine Session und zeigt ein Wort aus einer Liste an. Die Wörterliste ist im yaml Format erstellt. Die Struktur entspricht einen Dictionary: Ein Zufallsgenerator suche ein Wort aus dieser Liste und zeigt die deutsche Ăśbersetzung an. Der Lernwillige kann sich die Deklinaktion der Fälle in Singular und Plural, mit und ohne Artikel ansehen. Ob seine Kenntnisse richtig sind, zeigt Seite 2 nach Absenden des Formulars in Form eines simplen Buttons an. Die Lösungsseite zeigt die korrekten Deklinationen an und eine Link auf die…
-
Digitalocean Setup fĂĽr eine Flask Anwendung – Teil 1
Dieser Blog wird Teil einer Serie fĂĽr eine Web Anwendung in Python auf einer Cloud Instanz. Ich habe mich fĂĽr DigialOcean entschieden. Linode, Azure, GCP, … wären alle genau so gut fĂĽr diesen Zweck. Die Anwendung wird aus einer Liste von Vokabeln ein Wort in Deutsch heraussuchen und anzeigen. Auf einer zweiten Seite wird die Ăśbersetzung des Worts und die Deklination angezeigt. Im ersten Teil werde ich die Einrichtung des Servers beschreiben. Teil 2 wird die HTTPS Konfiguration behandeln. Teil 3 schliesslich beschreibt die Python Flask Anwendung und deren Deployment mit Github Actions. Teil 4 wird die Einrichtung der Subdomain is.hslomka.de und die Umleitung auf meinen Server beinhalten. Das Ergebnis…
-
Identifying the Process on an Open Port
There are several ways to find the process on an open port. As an example, let’s find out which process is running on port 5000. The first attempt could be to use `grep` on the port with ps -ef. This approach is only successful if a process receives the port as an argument. This is only the case in a few instances. LSOF The lsof command with the -i option followed by :<PORT> displays the processes that are keeping this port open. đź’ˇIf you are not the technical user under which the process is running, you will not see any output. Using sudo or as the user who owns the…
-
Daten Visualisierung
Bezüglich Datenvisualisierung bin ich vor Kurzem auf einen Bericht gestossen. Er ist inhaltich zwar sehr umfassend, aber trotzdem gut lesbar und in dem Sinne kompakt, dass der Inhalt nicht zu gesprächig erläutert wird. Das Dokument ist auf Github als Web Version, EPub und PDF verfügbar: Data Visualization Guide for Presentations, Reports, and Dashboards Ich kann das Dokument uneingeschränkt empfehlen.
-
WebSphere Application Server Support bis 2030
IBM hat fĂĽr WebSphere Application Server die Support Laufzeit bis mindestens Ende 2030 verlängert. Das gilt fĂĽr diese Produkte: – IBM WebSphere Application Server V8.5.5 – IBM WebSphere Application Server V9.0.5 – IBM WebSphere Application Server Network Deployment V8.5.5 – IBM WebSphere Application Server Network Deployment V9.0.5 – IBM WebSphere Application Server Family Edition V8.5.5 – IBM WebSphere Application Server Family Edition V9.0.5 – IBM WebSphere Application Server – Express® V8.5.5 – IBM WebSphere Application Server for z/OS®, V8.5.5 – IBM WebSphere Application Server for z/OS, V9.0.5 Original Bekanntmachung