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.

How to Bundle Bootstrap-Icons That Have Sass and Font Resources With…

To bundle Bootstrap Icons that have Sass and font resources with Webpack in production mode, you’ll need to make a few modifications to your Webpack configuration. Here’s a step-by-step guide on how to achieve this:

  1. Install Dependencies:

    First, make sure you have the necessary dependencies installed. You’ll need sass-loader, css-loader, style-loader, postcss-loader, and resolve-url-loader to handle Sass and CSS files. You may also need the file-loader or url-loader for fonts and other assets.

How to Remove Generated License File Webpack

It appears that you want to remove the generation of license comments in your webpack bundle. To achieve this, you can set the extractComments option of the TerserPlugin to false. This will prevent the plugin from extracting and adding license comments to your bundle. Here’s how you can modify your webpack configuration:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');

module.exports = {
   optimization: {
      minimize: true,
      minimizer: [
         new TerserPlugin({
            extractComments: false, // Set this option to false
         }),
      ],
   },
   entry: './web/src/js/main.js',
   output: {
      filename: 'bundle.js',
      path: path.resolve(__dirname, 'web', 'static', 'assets', 'js'),
   }
};

By setting extractComments to false, the TerserPlugin will not include license comments in your minified bundle. This should help you achieve your goal of removing the generated license file from your webpack output.

Go HTML Template Active Nav-Link Bootstrap

In the provided HTML code snippet, it appears to be a part of a Bootstrap navigation menu that is using Go’s HTML template syntax to conditionally add the “active” class to a navigation link based on a condition. In this case, it is checking whether the current page’s title is equal to “Home” and adding the “active” class if the condition is true.

Let me break down the code for you:

Check Whenever Locked or Not via SSH on Windows

If you’re looking to determine whether a Windows machine is locked or not via SSH, you can use PowerShell commands to achieve this. The Get-Process command with the logonui argument can be used to check the status of the “LogonUI” process, which is responsible for the Windows login screen. If the “LogonUI” process is running, it typically means that the user is logged in and the machine is not locked. If the process is not running, it might indicate that the machine is locked or at the login screen.

Lock Windows 11 Remotely Using Sleepwatcher Mac

In this guide, we will walk you through the process of remotely locking a Windows 11 computer from your Mac using sleepwatcher. This will require SSH access to your Windows machine configured with a public key instead of a password. Follow these steps to set up remote locking:

Prerequisites

  1. SSH Configuration: Ensure that you have SSH access to your Windows 11 computer from your Mac, and it is set up to use a public key for authentication instead of a password. If you haven’t set up SSH with public key authentication, you can find guides online for this process.

Setting Up Windows SSH Server With Public Key Authentication

In this guide, we will walk you through the steps to set up an SSH server on a Windows system and configure it to use public key authentication instead of a password. This enhances security by eliminating the need for password-based access and relying on cryptographic keys for authentication.

Prerequisites

Before you start, ensure you have the following:

0%