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.

Personal Website Outline

Within this article, you’ll find a prime example of a personal website outline that serves as a valuable reference. This exemplary outline showcases the best practices and design principles employed by experts in the field, offering inspiration and guidance for your web development projects.

Homepage

  • Header:

Setting Up Nginx as a Reverse Proxy With Let's Encrypt and Fail2ban Using Docker Compose

In this article, we will explore how to set up a powerful and secure web server environment using Nginx as a reverse proxy with Let’s Encrypt SSL certificates and Fail2ban for enhanced security. We’ll leverage Docker Compose to simplify the deployment process and enable easy management of our services. By the end of this guide, you’ll have a robust setup that includes SSL encryption and protection against malicious actors.

1. Prerequisites

Before starting, ensure that you have a server or virtual machine running a supported operating system. Additionally, make sure your domain name is properly configured and pointing to your server’s IP address.

Building and Deploying a React Application to Nginx HTML Folder Using GitLab CI With Separate Runners

Deploying a React application involves building it on one server and deploying it to another. GitLab CI provides a robust solution for automating this process, allowing you to leverage different runners for the build and deployment stages. In this article, we will explore how to utilize GitLab CI to build a React application on a build server and deploy the built source to the Nginx HTML folder on a production server using separate runners.

Executing an Embedded Bash Script in Go With Interactive Input

This article will delve further into the code and explain how to enable interactive input when executing the embedded Bash script. We’ll walk through the code and understand how to connect the Go program’s standard input to the command’s standard input, allowing interaction with the Bash script.

1. Overview of the Code

The provided code is a Go program that executes an embedded Bash script. It imports necessary packages such as fmt, log, os, and os/exec to handle command execution, input/output, and error handling.

Running an Embedded Bash Script With Command-Line Arguments in Go

In this article, we will explore how to embed a Bash script within a Go program and execute it while passing command-line arguments to the embedded script. This approach allows us to package the script directly within the Go binary, eliminating the need for an external script file. We will leverage the os/exec package and the Go embed feature to achieve this.

Prerequisites

  • Basic understanding of Go programming language
  • Familiarity with executing shell scripts

Step 1: Embedding the Bash Script

To embed the Bash script in the Go program, we can use the Go embed feature. Place the Bash script file, named bash.sh in this example, alongside the Go source file. Annotate the script content using the //go:embed directive to indicate that it should be embedded in the binary:

Removing All Comments, Including Legal Ones on Vite Build

In software development, comments serve as a valuable tool for code documentation, explanations, and annotations. However, there are situations where it may be necessary or desirable to remove all comments, including legal ones, from your Vite builds. In this article, we will explore how to achieve this by utilizing the legalComments option in Vite’s esbuild configuration.

Understanding the legalComments Option

Vite, a fast and efficient web development build tool, incorporates the esbuild plugin to optimize JavaScript and TypeScript code. One of the available options for esbuild is legalComments, which allows developers to control the inclusion of legal comments in the final build output.

0%