Regex replace tags around digits

If you would replace all <p>[some digits, such as "10", or "23", or "348"]</p>, you could use this regex code:

search: <p>(.*?\d{2})</p>

replace: <h6>\1</h6>

Indeed (.*?) is whatever, and (.*?\d{2}) is whatever number (with more than two digits).

Html emojis

Here you can find a complete set of available emojis to use in your website.

You can have an image from a simple html code, like this:

📆 🌤

To add an emoji via css, you have to set something like

.book:before {
  content: "\01F4D5";
}

kdesu problems with kubuntu 22.04

In Kubuntu 22.04 it could be impossible to start programs such as kubuntu from kde menu while with terminal (command sudo krusader) it will remain possible.

To fix this bug (due to the lack of kdesu in kubuntu 22.04), you can use (in kde menu):

pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY krusader

System not starting after upgrading to Ubuntu 22.04

After upgrading Ubuntu from 20.04 to 22.04 it can happen that you cannot start the desktop: emergency mode.

In some case it could be happened that fstab was modified and the efi partition is set with a wrong UUID. Therefore you can try to change, in your fstab file, the efi UUID (i.g. copying it from a working installation).

old windows releases in virtualbox

It is possible to virtualize old windows releases, such as windows 3.1, windows 98 (download here), or windows ME and the like.

But there are severe limitations: your host keyboard and mouse will be unavailable, and no link will be possible between the host and the guest system.

The reason is that in that old systems you cannot install the virtualbox guest additions.

leaving xampp

For many years I used xampp (for Linux: Lampp), because of its simplicity, unlike the “native” Linux apache/php/mysql apps, wich seemed to me very difficult to configure.

The pro of xampp is its simplicity (with few mouse clicks you can do all to install and configure your local php/mysql sever). But the con is that your xampp apps don’t are updated regularly, and there can raise conflicts with Linux “native” mysql.

Therefore I decided to learn how to configure “native” (system-rooted, so to say) apache/php/mysql apps. I chose to install mariadb and not mysql.

And in these last weeks I managed to configure the server, with the following steps:

  • sudo apt install -y apache2
  • sudo apt install -y php
  • sudo apt install mariadb*
  • sudo mysql_secure_installation
  • sudo mysql -u root -p (and within >mysql shell
    • use mysql
    • GRANT ALL PRIVILEGES ON . TO 'root'@'localhost' WITH GRANT OPTION;
    • SHOW GRANTS FOR 'root'@localhost; //to check if it is all right
    • FLUSH PRIVILEGES;
    • exit;
  • sudo systemctl enable mariadb.service