<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Wervice</title>
    <description>The latest articles on DEV Community by Wervice (@wervice).</description>
    <link>https://dev.to/wervice</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1429024%2Fdb710ef9-22ea-4766-beeb-59882e9cc89d.png</url>
      <title>DEV Community: Wervice</title>
      <link>https://dev.to/wervice</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wervice"/>
    <language>en</language>
    <item>
      <title>A recap about the Zentrox development</title>
      <dc:creator>Wervice</dc:creator>
      <pubDate>Sat, 28 Sep 2024 16:25:26 +0000</pubDate>
      <link>https://dev.to/wervice/a-recap-about-the-zentrox-development-34bd</link>
      <guid>https://dev.to/wervice/a-recap-about-the-zentrox-development-34bd</guid>
      <description>&lt;h2&gt;
  
  
  What am I working on?
&lt;/h2&gt;

&lt;p&gt;I am working on a project called Zentrox. Zentrox is an open source tools to remotely adminster your linux home lab servers/devices.&lt;br&gt;
&lt;a href="https://github.com/wervice/zentrox" rel="noopener noreferrer"&gt;https://github.com/wervice/zentrox&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How far am I with Zentrox?
&lt;/h2&gt;

&lt;p&gt;Zentrox is still its beginnings. I am currently working on creating a test release so people can actually try the project for the first time. It currently does not support as many features as some other applications for server admin.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fugenn5f1lf3ulo7b0qjc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fugenn5f1lf3ulo7b0qjc.png" alt="Screenshot of the current Zentrox frontend" width="800" height="313"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where am I going with my project?
&lt;/h2&gt;

&lt;p&gt;Zentrox is supposed to get more features like a media center, package update automation and more. It is only developed by me, so I can not guarantee that I will add a feature. The project lacks documentation as well, but having learned from my re-write to Rust, I will add docs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What technologies does Zentrox use (+ Some well deserved credits).
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Backend
&lt;/h3&gt;

&lt;p&gt;Zentrox backend was originally written in JavaScript with Node.JS as its runtime. This became annoying to develop and pretty slow, which is why I decided to re-write it in Rust 🦀 - Yes I re-wrote several thousand lines of undocumented JavaScript code to Rust, as a hobby project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, what framework do I use?&lt;/strong&gt; Zentrox uses the &lt;a href="https://actix.rs/" rel="noopener noreferrer"&gt;&lt;code&gt;actix_web&lt;/code&gt;&lt;/a&gt; framework which is a great library. My DevExp. with this tool was nice. It has good documentation and powerful tools. It was easy to implement for me as I was previously using Express.JS and Flask (Python). Actix also has other helper libraries for files, cookies, sessions,... which I use in my project as well.&lt;/p&gt;

&lt;h3&gt;
  
  
  Frontend
&lt;/h3&gt;

&lt;p&gt;The frontend of Zentrox is written using React. Of course I did not write this frontend without any frameworks. I use Next.JS by Vercel as a framework. Zentrox also uses a UI library called &lt;a href="https://ui.shadcn.com/" rel="noopener noreferrer"&gt;shadcn&lt;/a&gt;. Shadcn is an amazing library. It made devloping frontend a lot easier when you do not have to build everything from the ground up. I'd also like to give some credit to Radix UI, as this is what Shadcn uses for its components. :-)&lt;/p&gt;

&lt;h2&gt;
  
  
  How does Zentrox work?
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;⚠️ The following text is technical.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Zentrox has three parts. The frontend (FE), the backend (BE) and the application programming interface (API). The API is only used to communicate between frontend and backend and is not meant for use with extensions, but I am not trying to prevent that either. It will just require authentication on the server-side to work.&lt;/p&gt;

&lt;h3&gt;
  
  
  Auth
&lt;/h3&gt;

&lt;p&gt;When you first set up Zentrox by running &lt;code&gt;install.bash&lt;/code&gt;, you are asked to set an admin username and password. You can also enable two factor authentication using OTP there.&lt;/p&gt;

&lt;p&gt;⚠️ 🤓&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You password is then hashed using OpenSSL. It uses the Sha512 algorithm with salting and PBKDF2.&lt;br&gt;
This makes it hard for hackers to brute-force your password.&lt;br&gt;
The same happens when logging in with the login-provided password.&lt;br&gt;
This process makes the login a bit slower than with blank Sha256 (the previous attempt), but I consider the lag to be negligible.&lt;br&gt;
I used this &lt;a href="https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html" rel="noopener noreferrer"&gt;document from OWASP&lt;/a&gt; as a reference.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When the user now logs in the stored password and entered password are compared, and if enabled the OTP token is also checked. The an encrypted cookie is stored on the users side that links to a database with a token that will then verify if a user is logged in. The cookie will not contain any sensitive data from then on.&lt;/p&gt;

&lt;p&gt;As soon as the user logs out, the cookie is invalidated and the token invalidated.&lt;/p&gt;

&lt;h3&gt;
  
  
  Privilege escalation
&lt;/h3&gt;

&lt;p&gt;Some things like managing the firewall require admin permissions. My inital attempt was to create another system user for zentrox with a password known to the Zentrox password.&lt;br&gt;
Instead of going this route, I am simply using &lt;code&gt;sudo&lt;/code&gt; and writing the password to sudos' stdin.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vault
&lt;/h3&gt;

&lt;p&gt;Vault is a key component of Zentrox. It is a self-hosted encrypted data storage. The files are located in &lt;code&gt;~/zentrox_data&lt;/code&gt;.&lt;br&gt;
&lt;strong&gt;But how does it work?&lt;/strong&gt; To use Vault, a user has to create a new vault by setting a password. The user can then upload a file to vault. The file gets encrypted using AES 256 GCM. Before this can happen, the encryption key is derived from the password using salted &lt;a href="https://en.wikipedia.org/wiki/Argon2" rel="noopener noreferrer"&gt;argon2&lt;/a&gt;. This makes brute-forcing and dictionary attacks very time consuming and expensive. The uploaded file is stored with an encrypted file name.&lt;/p&gt;

&lt;p&gt;This entire procedure only provides protection from the file being viewed. It does not yet protect against ransomware or &lt;a href="https://en.wikipedia.org/wiki/Wiper_(malware)" rel="noopener noreferrer"&gt;wipers&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dead code
&lt;/h2&gt;

&lt;p&gt;I've been working on Zentrox for ~6 months at the time of writing this article. Initially, Zentrox was meant to be a way to link my existing &lt;a href="https://github.com/Wervice/Codelink" rel="noopener noreferrer"&gt;Codelink&lt;/a&gt; projects together by providing a hub for the applications. Thus Zentrox started a sub-project of Codelink and was later split off, because it went in a different direction than what I planned.&lt;br&gt;
Today, the Codelink project is not maintained, as Zentrox occupied my time working on hobby projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  users.c
&lt;/h3&gt;

&lt;p&gt;I wanted Zentrox to be able to create system users on its own. I was unable to get &lt;code&gt;useradd&lt;/code&gt; and &lt;code&gt;adduser&lt;/code&gt; to work like I planned. This was necessary as I was using vsftpd and wanted to use a system user instead of a vsftpd virtual user. &lt;/p&gt;

&lt;p&gt;So, I did the most rational thing that I could have done there. /s&lt;br&gt;
I started learning C, to write a program that modifies the /etc/shadow and /etc/passwd files of a users machine. (&lt;strong&gt;We are in the section "Dead Code", this code never made it into any releases and I always had a disclaimer in the repo or Zentrox about this code.&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;Here is an image of &lt;a href="https://github.com/Wervice/zentrox/blob/6f7b74680c8fd1459ab16b7b79e37ce98f5e0a8d/libs/users.c" rel="noopener noreferrer"&gt;the C code&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyxpcyrkpbg4d9zour6o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiyxpcyrkpbg4d9zour6o.png" alt="Screenshot of some C code made with carbon.now.sh" width="800" height="731"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I realized that it would probably not be such good of an idea to modify system files using self-built code and I purged the entire idea. I learned some C on the way there and I think that pretty cool!&lt;/p&gt;

&lt;h3&gt;
  
  
  Mapbase
&lt;/h3&gt;

&lt;p&gt;I was looking for an easier way to store Zentrox configuration and some variables than making a file for every variable, because that was how I did it for a long time.&lt;br&gt;
I settled on making my own little key-value store/database. I called it Mapbase and wrote it in Go. This was a fun experience, but has now been replaced with a &lt;code&gt;.toml&lt;/code&gt; file, as Mapbase is not really that different from toml, but was a bit tedious to work with especially considering it added yet another language to Zentrox. Here is a meme showing what the Zentrox language statistics looked around that time (Go not included):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcnbpu2b3t8v77zjumvp7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcnbpu2b3t8v77zjumvp7.png" alt="Meme about Zentrox source code" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  The old frontend
&lt;/h3&gt;

&lt;p&gt;The old frontend was nice, but I removed it because it became anoying to work with. It has now been replaced with the React frontend I described in the beginning of this post.&lt;br&gt;
It once looked like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6d01i255exopsnv6mxux.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6d01i255exopsnv6mxux.png" alt="Screenshot of the old Zentrox frontend" width="800" height="423"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to everyone who made be aware of bugs and things not to do :-)&lt;/p&gt;

&lt;p&gt;Please let me know what you think about Zentrox and this post in the comments. Have a nice day.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>homelab</category>
      <category>linux</category>
    </item>
    <item>
      <title>Working on a single board computer</title>
      <dc:creator>Wervice</dc:creator>
      <pubDate>Sun, 19 May 2024 14:17:05 +0000</pubDate>
      <link>https://dev.to/wervice/raspberry-pi-as-development-environment-2m6e</link>
      <guid>https://dev.to/wervice/raspberry-pi-as-development-environment-2m6e</guid>
      <description>&lt;p&gt;A few weeks ago, I got my Raspberry Pi 5 or more specifically, a starter set including it, a fan, SD Card and case.&lt;br&gt;
I ran some stress tests on the device to see how performant the device really is. I was shocked by how easily it handled most of the tasks that were thrown at it, like video playback, &lt;a href="https://linux.die.net/man/1/stress" rel="noopener noreferrer"&gt;&lt;code&gt;stress&lt;/code&gt;&lt;/a&gt; command or simple browsing. I didn't write those measurements down, so I cannot add them to this post. Anyway, there are other websites that probably have done a better job at analyzing the Pi than I did.&lt;/p&gt;

&lt;p&gt;At this time, my development environment was a Fedora laptop with many packages and system changes. This became a problem when working on one of my side projects called &lt;a href="https://github.com/Wervice/zentrox" rel="noopener noreferrer"&gt;Zentrox&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To replace/extend this environment, I decided to set my Raspi up as a development system. This was actually pretty easy, and if you want to, you can follow me along here.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install Raspbian and enable SSH&lt;/li&gt;
&lt;li&gt;Which tools am I using very often?

&lt;ol&gt;
&lt;li&gt;Neovim&lt;/li&gt;
&lt;li&gt;Tmux&lt;/li&gt;
&lt;li&gt;Btop&lt;/li&gt;
&lt;li&gt;Chrome&lt;/li&gt;
&lt;li&gt;Compilers, interpreters, git, ssh, fish...&lt;/li&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;Which of these tools should run on the raspi?

&lt;ol&gt;
&lt;li&gt;Neovim&lt;/li&gt;
&lt;li&gt;Tmux&lt;/li&gt;
&lt;li&gt;Compilers and interpreters&lt;/li&gt;
&lt;li&gt;Docker&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;li&gt;How do I get thes tools running on the raspi?

&lt;ol&gt;
&lt;li&gt;Copy Neovim and Tmux config to the raspi (using ssh file transfer)&lt;/li&gt;
&lt;li&gt;Install btop, nodejs,...&lt;/li&gt;
&lt;li&gt;Get docker running&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;

&lt;/ol&gt;

&lt;p&gt;After I installed, updated and configured all applications and packages the raspi now easily runs my project(s), gcc,...&lt;/p&gt;

&lt;p&gt;The only thing missing is proper &lt;code&gt;pip3&lt;/code&gt; functionality. Every time I try to install a Python package, I am hit with this error:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7orahm0wsfzw6s2x487.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7orahm0wsfzw6s2x487.png" alt="Picture of a PiP3 error message"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A few screenshots of the working setup (taken in Windows Terminal on W11 over SSH)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lszy094yg5zku092yyx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2lszy094yg5zku092yyx.png" alt="Screenshot of Neovim running in Tmux running on my Raspi over SSH"&gt;&lt;/a&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8gmtu3z2i5ygp1ee8f71.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8gmtu3z2i5ygp1ee8f71.png" alt="Image description"&gt;&lt;/a&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndt84zjum4ws88w4zzyz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fndt84zjum4ws88w4zzyz.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you liked this post. Feel free to add an emotion, leave a comment (constructive or not), and maybe star Zentrox.&lt;/p&gt;

</description>
      <category>raspberrypi</category>
      <category>linux</category>
      <category>neovim</category>
    </item>
    <item>
      <title>How I wrote a package manager in JavaScript</title>
      <dc:creator>Wervice</dc:creator>
      <pubDate>Thu, 18 Apr 2024 13:00:00 +0000</pubDate>
      <link>https://dev.to/wervice/how-i-wrote-a-package-manager-in-javascript-h69</link>
      <guid>https://dev.to/wervice/how-i-wrote-a-package-manager-in-javascript-h69</guid>
      <description>&lt;p&gt;Firstly, you will probably be asking yourself: Why did he do this?&lt;br&gt;
I have been working on a project called Zentrox for a few weeks by now. Zentrox is a server administration tool, that gives you a dashboard in the web browser.&lt;br&gt;
The dashboard should include information about the storage, the users, file sharing protocols and the installed packages.&lt;/p&gt;

&lt;p&gt;The first step to creating this package manager was figuring out, how I was going to do this. So, I wrote some boilerplate HTML code and some CSS for the front-end. At this time, I already had an Express.js server and some front-end code.&lt;br&gt;
Still, I didn't know, how to manage the packages and what I actually wanted to do in detail. So I chose to write the following functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;listing all packages in the repositories&lt;/li&gt;
&lt;li&gt;listing all packages on the system&lt;/li&gt;
&lt;li&gt;installing a package&lt;/li&gt;
&lt;li&gt;removing a package&lt;/li&gt;
&lt;li&gt;getting an icon for an installed package&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then, I went on Google and looked for things like “JavaScript package manager”, “Package manager for JavaScript” or “DNF API Python”. The only one that really lead to a result (that is not NPM, …) was the DNF API for Python. I tried to write a small python script, but it didn't work. Also, I didn't find an API for other package managers like DNF or pacman.&lt;br&gt;
So, I started by writing a JavaScript, that uses &lt;code&gt;exec&lt;/code&gt; to run some commands. One command was (and still is): &lt;code&gt;dnf list&lt;/code&gt;. The problem with this was, that I didn't know the result and also did not want to write some complicated async or callback code.&lt;/p&gt;

&lt;p&gt;While browsing the Node documentation, I found a function named &lt;code&gt;execSync&lt;/code&gt;. This function does exactly what I want. It executes the command in a synchronous order.&lt;/p&gt;

&lt;p&gt;Now, the only thing stopping me from doing the first four tasks was figuring out the commands to install, remove and list packages under apt, DNF and pacman.&lt;br&gt;
Those were pretty easy to figure out. Then I wrote a condition that detects which distro the manager is running on. &lt;/p&gt;

&lt;p&gt;After I tested it on my one system, it turned out to be working just fine.&lt;/p&gt;

&lt;p&gt;So, the next step was adding support for icons of installed packages.&lt;/p&gt;

&lt;p&gt;I did some research and figured out, that packages that have an icon, probably also have a &lt;code&gt;.desktop&lt;/code&gt; file in &lt;code&gt;/usr/share/applications&lt;/code&gt;. This file will then contain a name, an icon, and the path to the binary.&lt;/p&gt;

&lt;p&gt;With this new knowledge, I wrote a script that reads the name and icon path of an application from its desktop file.&lt;/p&gt;

&lt;p&gt;Some packages do not include an icon in the corresponding  desktop file, though. Nonetheless, every desktop file will contain a name and execution path. These can be used to get an icon from the installed icon pack on the system.&lt;/p&gt;

&lt;p&gt;To get to these icons, I first need to know where they all are. Most of the time, the location for icons on Linux is &lt;code&gt;/home/username/.icons&lt;/code&gt; or &lt;code&gt;/local/share/icons&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now, I just had to write a script that reads these folders, selects a pack, looks the name up and then returns the icon to me.&lt;/p&gt;

&lt;p&gt;The problem was, that there may be an icon pack, that does not contain the icon at all. So, I also wrote some code, that detects that.&lt;/p&gt;

&lt;p&gt;At this point, I had all the planned functions done and published it on GitHub. I also wrote about it on Reddit.&lt;/p&gt;

&lt;p&gt;Very soon, there was one thing, that was (rightfully) criticized by several Redditors. I did not sanitize the sudo password required to install and remove packages.&lt;/p&gt;

&lt;p&gt;I added a few &lt;code&gt;.replaceAll&lt;/code&gt; to the code. Then it was just fine. After connecting it with the front-end and testing it on a Manjaro and Debian distro, I wanted to call it a day. &lt;/p&gt;

&lt;p&gt;The issue was, that it was terribly slow. So, instead of running the command used to list all available packages every time, when the app is opened, I made a background worker, that caches it to another file in an interval of 1h.&lt;/p&gt;

&lt;p&gt;So, every time the package manager is loaded, the cached data is used. Now, the only this that is slowing it down is the command used to list installed packages.&lt;/p&gt;

&lt;p&gt;The last thing to do was integrating it into my project.&lt;br&gt;
I added a section called “Packages” in my Zentrox dashboard.&lt;br&gt;
You can find it here: &lt;a href="https://www.github.com/wervice/zentrox" rel="noopener noreferrer"&gt;wervice/zentrox&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The final product looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Furbyve67rj56i5tpqnuc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Furbyve67rj56i5tpqnuc.png" alt="Image description" width="722" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to, you can install Zentrox on your system and test the package manager. &lt;/p&gt;

&lt;p&gt;Please tell me, if you spotted a problem.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>linux</category>
      <category>packages</category>
    </item>
    <item>
      <title>Chosing the right code editor: A quick guide</title>
      <dc:creator>Wervice</dc:creator>
      <pubDate>Wed, 17 Apr 2024 14:16:00 +0000</pubDate>
      <link>https://dev.to/wervice/chosing-the-right-code-editor-a-quick-guide-4hbk</link>
      <guid>https://dev.to/wervice/chosing-the-right-code-editor-a-quick-guide-4hbk</guid>
      <description>&lt;p&gt;There are many code editors out there. Some of them have specialised for one language or a development stack. Others are good for general development.&lt;/p&gt;

&lt;p&gt;So, lets start with the first editor:&lt;/p&gt;

&lt;h2&gt;
  
  
  Visual Studio Code
&lt;/h2&gt;

&lt;p&gt;Visual Studio Code is a code editor developed by Microsoft. It comes with most features you may want for coding out of the box.&lt;br&gt;
It is commonly used in web development, but you can also use it for other stacks like writing Python scripts. &lt;br&gt;
It has its own extension store. There you can find many add-ons. These will add support for other programming languages, give you new themes or help you while coding.&lt;/p&gt;

&lt;p&gt;If you do not want to use something developed by Microsoft, you can use the alternative VSCodium.&lt;/p&gt;

&lt;p&gt;VSCode is often recommended for beginners, because it is very ease to use. Nonetheless, you can also use it as a professional.&lt;/p&gt;

&lt;p&gt;You can also try the &lt;a href="https://vscode.dev/" rel="noopener noreferrer"&gt;web version&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fys3pn0okv5bu3cz5tfgr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fys3pn0okv5bu3cz5tfgr.png" alt="Screenshot of Visual Studio Code" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Screenshot of my VSCode configuration with the Catppuccin theme installed
&lt;/h6&gt;

&lt;h2&gt;
  
  
  Visual Studio
&lt;/h2&gt;

&lt;p&gt;Visual Studio is a very feature rich IDE. It is often used to write Windows applications in C#, C++ or C. It also supports other languages.&lt;/p&gt;

&lt;p&gt;Visual Studio is developed by Microsoft as well. It may use a lot of storage on your system.&lt;/p&gt;

&lt;p&gt;I would recommend Visual Studio for developing native Windows apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Neovim
&lt;/h2&gt;

&lt;p&gt;Neovim is another very popular code editor. It is an open source project. Neovim runs in the terminal. &lt;br&gt;
It uses the Vim keybindings. They can be tricky to get used to. In my experience, you can learn the keybindings in just a few days.&lt;/p&gt;

&lt;p&gt;You can extend Neovim using extensions written in a programming language called Lua.&lt;br&gt;
In addition to that, it is very light on system resources.&lt;/p&gt;

&lt;p&gt;Neovim &lt;strong&gt;may&lt;/strong&gt; help you get more productive. I am currently using it because of this reason.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4s4oz9xky6i1mf0jwdm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff4s4oz9xky6i1mf0jwdm.png" alt="Screenshot of Neovim with NVChad" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;
  
  
  Screenshot of my Neovim configuration with Catppuccin theme and NVChad
&lt;/h6&gt;

&lt;h2&gt;
  
  
  Emacs
&lt;/h2&gt;

&lt;p&gt;Just like Neovim, Emacs is an open source code editor. It is very feature rich. &lt;br&gt;
Sometimes, people even call it an operating system (for fun).&lt;br&gt;
You can extend it almost to infinity with browsers, terminals and more.&lt;br&gt;
Emacs also has its own set of shortcuts, that may be confusing in the beginning.&lt;/p&gt;

&lt;p&gt;I would recommend Emacs, if you want a very extensible code editor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sublime Text
&lt;/h2&gt;

&lt;p&gt;Sublime Text is a proprietary text editor. It is similar to VSCode, since it has some features by default and an integrated extension manager.&lt;/p&gt;

&lt;p&gt;In my experience, it is heavier on resources and more complicated to use than VSCode.&lt;/p&gt;

&lt;p&gt;Also, it should be noted, that you are supposed to buy it, but you can "try" it for how long you want.&lt;/p&gt;

&lt;p&gt;I would recommend this, if you are looking for something similar to Visual Studio Code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Notepad++
&lt;/h2&gt;

&lt;p&gt;Notepad is a text/code editor. I comes with some simple features for coding out of the box. The interface is very minimal. It uses normal keyboard shortcuts, like CTRL+S or CTRL+C.&lt;br&gt;
You can change the look for the editor using themes.&lt;/p&gt;

&lt;p&gt;This editor is good, if you want to start coding with a light editor.&lt;/p&gt;

&lt;h2&gt;
  
  
  Eclipse IDE
&lt;/h2&gt;

&lt;p&gt;Eclipse is an IDE specialized for Java development. Java is a language used to write Android apps, server back-ends and desktop applications.&lt;/p&gt;

&lt;p&gt;I would recommend it for developing Java code.&lt;/p&gt;

&lt;h2&gt;
  
  
  More editors are...
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;BlueJ (Java development)&lt;/li&gt;
&lt;li&gt;GNU Nano (Terminal based text editor)&lt;/li&gt;
&lt;li&gt;XCode (Swift development under OSX)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Since there are so many code editors, it may be hard to decided among them. I would recommend a general purpose editor, if you do not focus on one language. &lt;br&gt;
You may consider some editors easier to use than others.&lt;/p&gt;

&lt;p&gt;Sometimes, there are also extensions for other code editors to bring the best of two editors together.&lt;/p&gt;

&lt;p&gt;I wish you lots of fun choosing and using an editor.&lt;/p&gt;

</description>
      <category>editor</category>
      <category>coding</category>
    </item>
  </channel>
</rss>
