How to speed up Ubuntu 18

Illustration: Bionic Beaver is slow
Illustration: Bionic Beaver is slow

TL;DR: A list of tweaks and settings that can improve your Ubuntu 18x’s speed A LOT.

Reading time: around 40 minutes, so if you don’t have that much time on your hand, you can go read something else.

If you’re one of the people who have noticed a significant change in booting speed, shutdown speed, and generally, operating speed of your computer after upgrading or installing Ubuntu 18.x, then read on, this article is for you.

I have an older model Lenovo T410 (4×2.4Ghz i5, 4GB RAM), that was working absolutely flawlessly with Ubuntu before the 18.04 version, and even with flavors of Ubuntu like Linux Mint Cinnamon based on Ubuntu 17, but after 18x came along, things started moving slower and slower.

Read more

How to regenerate icon cache on linux ?

A GTK configuration screen complaining about a missing icon cache file on Peppermint Linux
A GTK configuration screen complaining about a missing icon cache file on Peppermint Linux

If you see some widget or configuration dialog in Linux,  complaining about the fact that your icon cache files are missing, here’s how you can easily fix it.

Using the manual method, or folder-by-folder method that is displayed in the small tooltip on the image, is cumbersome, and if you have a lot of icons that have missing cache files, it can take up a lot of time and would force you to do a lot of unnecessary typing.

*see update at the end*

Read more

How to install Prestashop on mysql 5.7 or newer

TL;DR version: here’s how you can solve the Prestashop installation error “SQL error on query Invalid default value for ‘last_connection_date'”.

A part of the Prestahop 1.6 Installation Assistant
A part of the Prestahop 1.6 Installation Assistant

If you are installing a Prestashop CMS for your e-commerce needs on a server that is configured with a mysql backend with version numbers 5.7, or any of its newer versions, you might get stuck at 12% of the installation screen, and get an error message that says something like “SQL error on query Invalid default value for ‘last_connection_date'” . This error simply means that the version of Prestashop that you are trying to install, used to handle some database management tasks differently, then the current mysql server expects it.

Most importantly, in the newer versions of the mysql server, beginning with version 5.6, some stricter data validation and field validation defaults have been implemented. And because of those “new rules”, some older php/mysql based software, and some CMS-es like Prestashop, will fail to install.

To circumvent these defaults, you can either temporarily, or permanently modify the way the mysql server loads on your system (if you have access to the “my.cnf” on Linux, usually located at /etc/mysql/my.cnf, or “my.ini” on Windows systems).

Open a simple text-editor in terminal (on Linux) or notepad if you are on Windows, and open your “my.cnf” or “my.ini” file. Add the configuration directive that will REMOVE the strict defaults enforcement.


If you already have blocks/sections in your config file, sections like [mysql] or  [mysqld], add it to [mysqld].

If your file is the default one, it will probably be almost empty, and end with 2 lines beginning with



Add these two lines then, before the !includedir directives:



Save the file. Restart your mysql server. (service mysql restart from a terminal, if you are on a Linux box, and the Restart Mysql button if you are on a Wamp server on Windows).

Retry the installation by clicking on the “click here to restart” link in the Prestashop installation screen.

Has this how-to helped you ? Please share the blog with your friends on your preferred social media. Still can’t install it ? Leave a comment in the commentbox, with the error message you’ve received, and I’ll do my best to help you.


How to parse HTML files with apache / php7

TL;DR version: here’s how to parse HTML files with PHP hypertext preprocessor on apache 2.4x webserver, and PHP7 on linux

In PHP 7, the newest and ever more popular version of the PHP scripting language, the only files that are parsed by default are the ones that have .php, .phtml, or .php3/php4/php5 extensions. I don’t know who might still be using .php3, .php4 (never seen anyone use this one), or .php5 file extensions, but I’m sure many of you still usually use HTML files, and want to insert some PHP code into it.

Obviously, even though a lot of discussion is against the practice of parsing HTML files with PHP, you might still need this option. Regardless of whether you are a beginner or a pro in the art of website creation, scripting, web programming and alike, you still need to be able to parse files with the HTML or HTM extension, as PHP files, because integrating some PHP code into HTML and viceversa, it’s the easieast way to quickly test out something in a browser. So set aside the “best practices” pride for now, and just accept it as a fact that a lot of people still need this option 🙂

Read more

Ahrefs bots are eating your bandwidth ? Here’s how to block them

The site can purportedly tell any site owner, for prices starting from 99$ / month, who links to them from where, and also provide site owners with other seemingly significant and meaningful data about visitor activity.

The problem is, they use software bots to crawl sites, and THOSE BOTS CLICK ON LINKS in your site, if you have outgoing links, probably to verify if the outgoing links have real destinations or are just linkbaits. For a regular site, WITHOUT AFFILIATE connections, this probably won’t hurt anyone, but in the case of affiliate sites, regardless of affiliate programs, it’s a disaster.

Read more

Quick apache .htaccess rules writer in PHP

Sometimes it’s good to have a quick .htaccess rules writer for your server / host, to block a larger number of IP addresses from accessing stuff on your site, like spambots, or people (bored kids ?) who try to hack into your site or blog. If you use any kind of statistics plugin on your wordpress blog, or any other stats on other platforms, you can most likely see the IP addresses and the paths these visitors have taken, trying to access your site in an unauthorised way, like trying to exploit a revolution slider vulnerability to show your config.php, or some other plugin.

So here’s the quickest way to deal with these IP addresses, presuming you are on a linux box with PHP installed, or on any computer with PHP available in command line (php5-cli package on debian/ubuntu/mint/fedora/q4os , basically, on most modern linux systems, and xampp or wampp package on windows based machines).

Read more