Dimas Maulana

Dimas Maulana

Developer

Welcome to my website! I am a developer with a current focus on React and Go. My experience encompasses both front-end and back-end development, enabling me to design and develop seamless and efficient applications.

Unanttended Upgrade Docker

To configure unattended upgrades for Docker on a Debian-based system, you can add the following line to the 50unattended-upgrades file. This will ensure that Docker packages are automatically updated when unattended-upgrades runs.

Here are the steps to do this:

  1. Open a terminal on your Debian-based system.

  2. Use a text editor to open the 50unattended-upgrades file for editing. You’ll typically find this file in the /etc/apt/apt.conf.d/ directory.

1
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
  1. Add the following line to the file, which specifies that Docker packages should be automatically upgraded:
1
2
3
4
5
Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}-security";
    "${distro_id}:${distro_codename}-updates";
    "Docker:${distro_codename}";
};

This configuration tells unattended-upgrades to include the Docker repository for automatic updates, in addition to the security and regular updates repositories for your distribution.

Removing Orphaned Packages on Debian/Ubuntu With Deborphan

When you install and remove packages on a Debian-based Linux distribution like Debian or Ubuntu, sometimes you end up with orphaned packages - packages that were installed as dependencies for other software but are no longer needed. These orphaned packages can take up disk space and clutter your system. One tool that can help you identify and remove these orphaned packages is Deborphan.

What is Deborphan?

Deborphan is a command-line tool for identifying and removing orphaned packages on Debian-based systems. It analyzes the package dependencies and checks which packages are no longer required by any other installed packages. Once it identifies these orphaned packages, you can choose to remove them, freeing up disk space and keeping your system clean.

Enabling Root as Default User in WSL on Windows 10

If you want to set the default user in Windows Subsystem for Linux (WSL) to “root” instead of your regular user, you can achieve this using PowerShell or by modifying the WSL configuration file. Please note that running WSL as the root user is generally not recommended for security reasons, as it can expose your system to potential risks. Proceed with caution and only if you have a valid reason for doing so.

Git Patch Applying and Creating Patches in Git

In Git, patches are a way to capture and apply changes made to a codebase. They can be useful for sharing changes between developers or for applying changes across different branches. In this article, we’ll explore how to create and apply patches in Git.

Creating Patches

Patching Non-Staged Files

To create a patch for changes that have not been staged yet, you can use the following command:

Vim Search and Replace String

Vim is a powerful text editor that offers various functionalities for searching and replacing strings within your text. Here are different ways to perform string replacements using Vim’s command mode:

Replace String on Selected Line

To replace a string on the currently selected line, you can use the :s command. For instance, to replace all occurrences of “foo” with “bar” on the selected line, you can use the following command:

Setting Up Your Own Apple Notes Server

In this guide, we will walk you through the process of setting up your own Apple Notes server using Docker and the tvial/docker-mailserver image. Please note that this setup will only provide an IMAP server, which can be used with Apple Notes for syncing your notes across devices. Let’s get started!

Prerequisites

Before you begin, make sure you have the following prerequisites:

0%