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 Change WordPress Site URL With WP-CLI

If you need to change the domain URL of your WordPress site, you can use WP-CLI, a powerful command-line tool for managing WordPress. Changing the site URL is a common task, especially when migrating your site to a new domain. Here’s a step-by-step guide on how to do it with WP-CLI.

1. Backup Your WordPress Database

Before making any changes, it’s crucial to create a backup of your WordPress database. This ensures that you can restore your site if anything goes wrong during the URL change process.

Accessing Windows or Mac Host IP in Docker

When working with Docker containers on Windows or Mac, you might need to access the IP address of the host machine from within the container. Docker provides two convenient DNS names that you can use to achieve this: host.docker.internal and gateway.docker.internal.

Using host.docker.internal

The DNS name host.docker.internal allows you to access the IP address of the host machine from within a Docker container. This is particularly useful when you need to communicate with services running on the host, such as a development server.

Whatsapp Webjs Wont Reconnect After Macbook Sleep

You’re facing an issue with the whatsapp-web.js library when trying to reconnect after your MacBook goes to sleep. The solution you’ve provided involves using a remote browser via Docker to run Chrome and then connecting whatsapp-web.js to it using the browserWSEndpoint option. This is a workaround to ensure that the connection is maintained even after your MacBook wakes up from sleep mode.

Here’s a breakdown of the steps and code you’ve provided:

Docker Compose Docker-Compose-Yml Command Multiline

Sure! The provided code snippet is meant to modify the Tomcat server information displayed when the server starts up. This can be achieved using Docker Compose by modifying the docker-compose.yml file as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
version: '3'
services:
  tomcat:
    image: tomcat:latest
    ports:
      - "8080:8080"
    command: >
      bash -c "mkdir -p /usr/local/tomcat/lib/org/apache/catalina/util/ &&
      echo server.info=PlantUML > /usr/local/tomcat/lib/org/apache/catalina/util/ServerInfo.properties &&
      catalina.sh run"      

In this Docker Compose configuration:

Mac Run PlantUML Server on Login

To run a PlantUML server on login for your Mac, you can follow these steps using Automator. This will ensure that the PlantUML server starts automatically every time you log in.

Step 1: Install PlantUML

First, make sure you have PlantUML installed on your Mac using Homebrew. You’ve already mentioned the command:

1
brew install plant-uml

Step 2: Create an Automator App

  1. Open “Automator” on your Mac. You can find it by searching for it in Spotlight or in the Applications folder.

Running Background Processes With Automator and Shell Scripts on Mac

In this article, we’ll explore how to run background processes using Automator and shell scripts on a Mac. We’ll compare two methods, one using a basic shell command and the other employing the nohup command for more robust background process management.

Method 1: Using a Basic Shell Command

To run a background process using a basic shell command in Automator, follow these steps:

0%