Snippets: a simple tech blog.
-
Enable syntax highlighting for nano on macOS Catalina
The default version of nano that is installed on a mac most likely does not support syntax highlighting. To check your version run: You will need to upgrade it using a version from Homebrew. If you don’t have Homebrew, then you can install it easily. Think of Homebrew like a command line based AppStore. To…
-
Highlight the current post’s tags in WordPress
List all tags in a bulleted list and highlight only the current post’s tags. Highlight the current post’s tags using CSS The idea is to show all the tags used on the site and then add a CSS class to the tags that are used in the current post. This class can then be styled…
-
Fix PHP executable not set in VSCode when running XAMPP on Linux
This is a fix for the following error when opening PHP files in VSCode or VSCodium: Cannot validate since no PHP executable is set. Use the setting ‘php.validate.executablePath’ to configure the PHP executable. This error means that VSCode does not know how to validate the contents of a PHP file and can’t show errors in…
-
Check PC Config using the Linux command line
View hardware and other details from the command line. View Hardware Details View Network Details
-
Zim vs Joplin
Comparison of note-taking apps for Linux. Zim and Joplin are note-taking apps that are available for Linux. I’ve been using Joplin for a while now to take notes and it works fine. I wanted to try a new notes app for Ubuntu (I’m using Lubuntu Desktop) and found Zim. Some thoughts below on how it…
-
Change the file upload size in NGINX
When you have a PHP-based website like WordPress running on NGINX, you would typically change the maximum file upload size in PHP settings e.g., in php.ini file or similar. NGINX web server also has it’s own configuration where you can set the max upload size server-wide. This is set in the .conf file using the…
-
Dual boot Zorin OS and Windows 10
Zorin OS is a user-friendly version of Linux that you can install and try if you are new to Linux. Download the Zorin OS .iso file Create a bootable USB (Installation USB) from the .iso file using balenaEtcher Plugin the USB and restart Windows Go to boot menu when Windows is restarting. Press F12 until…
-
Get a Let’s Encrypt SSL certificate for your domain
Install a free SSL certificate and serve your site with “https”. Let’s Encrypt provides free SSL certificates and with the help of the installation tool called Certbot, you can easily enable an HTTPS certificate for your website. These instructions are for users running either Nginx or Apache on Ubuntu server and have access to the…
-
Set MySQL password from the command line
If your MySQL root user’s password is currently empty (not set) and you want to add one to disable access without password, use the following commands. Open MySQL my entering the below in your command line: Here, mysql.user is the database which has the list of all the MySQL users. So the command breaks down…