Merge release branch into main using command line

Go to your main branch:

git checkout main

Type the following command:

git merge --no-ff release/v1.0.0

Add information:

Merge release/v1.0.0 branch into main

Summary:

- Element.php: class to manage Element id and HTML Element attributes
- Form.php: class to generate Form HTML Element
- Input.php: class to generate Input HTML Element

Contributors:

- Carlos E. Alvarez <emathcs@gmail.com>

Push to main branch:

git push origin main

Configure WordPress htaccess in your Userdir on macOS

When the WordPress Permalink structure is configured as Post name, WordPress creates a htaccess configuration code like this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /~your_username/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~your_username/wordpress/index.php [L]
</IfModule>

On macOS it generates a error message like this:

[Thu Oct 31 16:34:03.141592 2026] [core:notice] [pid 3141] AH00052: child pid 3141 exit signal Segmentation fault (11)

It can be fixed adding a comment in one line:

<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /~your_username/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /~your_username/wordpress/index.php [L]
</IfModule>

Remember it is a local configuration, don’t apply this in your server.

Install a basic email server on Debian 13

Install the following packages:

aptitude install postfix

Postfix configuration

  • General mail configuration type: Internet Site
  • System mail name: your-domain.com
  • Recipient for root and postmaster mail: admin
  • Other destinations to accept mail for (blank for none): press enter
  • Local networks: press enter
  • Mailbox size limit (bytes): press enter
  • Local address extension character: press enter
  • Internet protocols to use: all

DNS configuration

Add the following records:

  • Type: A
  • Host: mail
  • Answer: server-ip
  • TTL: 300
  • Type: MX
  • Host: empty
  • Answer: mail.your-domain.com
  • TTL: 300
  • Prior: 10
  • Type: TXT
  • Host: empty
  • Answer: v=spf1 ip4:server-ip ~all
  • TTL: 3600

Apache Userdir configuration on Debian 13

Enable the following mode:

a2enmod userdir

Edit the following file replacing the public_html by Sites:

nano /etc/apache2/mods-enabled/userdir.conf

In the following file:

nano /etc/apache2/mods-available/php8.4.conf

Comment the section:

<IfModule mod_userdir.c>
    <Directory /home/*/public_html>
        php_admin_flag engine Off
    </Directory>
</IfModule>

Then give the following permissions to the folders:

chmod 711 /home/user_name
chmod 755 /home/user_name/Sites

Squahs into main using command line

Go to your main branch:

git checkout main

Type the following command:

git merge --squash branch_name

Create the commit:

git commit

Following the format:

feat(base): add the base folder

- base.cpp: file to write the code
- data.in: file for a test case
- data.out: file for results in the case the exercise requests to upload a file
- makefile: for generating the base object file, runnig a test case and generating an output file

Co-authored-by: Carlos E. Alvarez <emathcs@gmail.com>

Push to main branch:

git push origin main

KVM on debian 13

As root install:

aptitude install qemu-kvm qemu-utils qemu-system-gui

Then, as a regular user create the img file:

qemu-img create -f qcow2 hda/debian.qcow2 20G

Installing the OS without network:

kvm -m 4096 -hda hda/debian.qcow2 -boot d -cdrom iso/debian-13.0.0-amd64-DVD-1.iso -nic none

Running the VM:

kvm -m 2048 -hda hda/debian.qcow2

Running the VM without display and with SSH access:

kvm -m 2048 -hda hda/debian.qcow2 -net nic -net user,hostfwd=tcp::2222-:22 -display none

Running the VM without display, with a web server and with SSH access:

kvm -m 2048 -hda hda/debian.qcow2 -net nic -net user,hostfwd=tcp::2222-:22,hostfwd=tcp::8080-:80 -display none

Configure fail2ban on debian 13

As root user install:

aptitude install fail2ban python3-systemd

Edit jail.local:

nano /etc/fail2ban/jail.local

Add the following configuration in the sshd section:

[sshd]
enabled = true
port = ssh
logpath = %(sshd_log)s
backend = systemd

Finally:

systemctl start fail2ban