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.

Tracing HTTPS Requests Using Mitmproxy

Mitmproxy is a powerful tool that allows you to intercept, modify, and inspect network traffic. It’s commonly used for debugging, security testing, and analyzing HTTP/HTTPS traffic. In this article, we’ll explore how to trace HTTPS requests using mitmproxy, both with a regular proxy and a transparent proxy setup.

Prerequisites

Before you start, make sure you have mitmproxy installed. You can install it using pip:

How to Delete Old Journal Logs in Ubuntu

If you’re running Ubuntu, you might accumulate a large amount of journal logs over time. These logs can take up valuable disk space. Fortunately, you can easily delete old journal logs to free up space on your system. Here’s how you can do it using the journalctl command with the --vacuum-time option.

Deleting Old Journal Logs

To delete old journal logs in Ubuntu, follow these steps:

Bash Check if Shell on Interactive or Login

In Bash, you can check whether the shell is running in an interactive or login mode using the provided commands. Here’s an explanation of each command and what it checks for:

  1. [[ $- == *i* ]] && echo 'Interactive' || echo 'Not interactive':

    • This command checks the value of the special shell variable $-, which contains a string of options and flags that are currently set for the shell.
    • The *i* pattern is used to check if the letter ‘i’ appears anywhere in the value of $-. If it does, it indicates that the shell is running in interactive mode.
    • If ‘i’ is found, it echoes ‘Interactive’, otherwise, it echoes ‘Not interactive’.
  2. shopt -q login_shell && echo 'Login shell' || echo 'Not login shell':

How to Fix Wrong Indentation When Pasting Source Code in VIM

When copying and pasting source code into the VIM text editor, you might encounter issues with incorrect indentation due to the way VIM handles auto-indentation. This happens because VIM’s default behavior tries to adjust the indentation based on the surrounding code, which can lead to unwanted results when pasting code from external sources. To prevent this, you can use the :set paste and :set nopaste commands to toggle the paste mode. Here’s how to do it:

Wsl2 Ram Overload Om Host (Draft)

WSL 2 (Windows Subsystem for Linux 2) has gained significant popularity among developers for its ability to run a full Linux kernel alongside the Windows operating system. However, one common issue that users may face is RAM overload on the host machine. This can lead to performance degradation and even system crashes. One approach to mitigate this problem is by limiting memory and processor usage for WSL 2 by editing the wsl.conf configuration file.

Kill Child Process and Parent Process Bash Linux

you want a set of Bash commands for managing processes in a Linux environment. Here’s an explanation of what each command does:

  1. Kill Child Process and Parent Process:

    1
    
    pid=17844 && pkill -TERM -P $pid && kill $pid

    This command first assigns the value 17844 to the variable pid. Then, it uses pkill with the -TERM option to send a termination signal to all processes with a parent process ID (PPID) equal to the value stored in pid. Finally, it uses the kill command to send a termination signal to the process with the PID stored in pid.

0%