If you are getting the following message Serve static assets with an efficient cache policy while using Lighthouse for youur site optimization, then you need to follow the following steps: Add the following settings to your site config file in Nginx. You can open it via: and paste the following text: Above, the expiry is set…More
The best programming blog.
Covering a wide array of programming topics.
How to enable GZip for CSS and JavaScript files on Nginx
Below are the steps to enable gzip for CSS and JavaScript files on Nginx. Run the following command on your Ubuntu’s terminal to open nginx.conf file: Scroll donw to Gzip Settings section in that file: Add the following line in that section: Hit CTRL + O and CTRL + ENTER to save the file. Run…More
Visual Studio Code: How to change font size of terminal window
Go to VSCode >> Preferences >> Settings. Navigate to Terminal › Integrated: Font Size setting. Adjust it to your desired font size say 16 Saving the settings will increase the font size of terminal window in Visual Studio Code..More
Convert varchar column to int in MySQL
Following is the script to convert a varchar datatype column to int type: You can further verify the column data type with the help of this blog: Check column data type in mysqlMore
Check column data type in mysql
Using the DESCRIBE or SHOW COLUMNS command in MySQL, you may determine the data type of a column in a table. To get details about the columns in a table, use the DESCRIBE command. The command takes the table name as an argument and returns information such as the column name, data type, and other…More
How to generate JWT Key
You can use node to generate JWT key which further can be used for JWT authentication. In the terminal, on the machine where node is installed, run the following command: The output will be like this: You can use the generated key for your JWT authentication logic.More
Invalid RSA Private Key OpenSSL
The reason could be that the your private key doesn’t actually is a RSA Private key i.e not starting with Follow the following steps to fix the Invalid RSA Private Key issue: Download OpenSSL 1.1, can be done via HomeBrew. Run th following commands: Run the following command to generate rsa private key: The generated…More
Amazon CloudFront Create a trusted key pair group
Make sure OpenSSL is installed on your machine. Run the following command to generate Public and Private key pairs: The above commands will generate the private and public key pairs in the Downloads folder. You can change the path based on your needs. Open the public key in a text editor and paste it in…More
Uninstall mono from Ubuntu
Run the following commands to uninstall mono and mono complete from Ubuntu You can verify whether the package is uninstalled by running the following command and it will give you the following output: dpkg-query: no packages found matching mono-completeMore
WordPress: Unable to create directory wp-content/uploads… Is its parent directory writable by the server
While uploading the images on WordPress site if you are getting the following error: then you need to follow these steps on Ubuntu server: Let’s say the path of your WordPress site on the server is: /var/www/my.wordpresssite.com/. Run the following commands on your Ubuntu server: After running the above commands the uploads folder will have…More