• Looking to enhance the performance of your MySQL server? This is a common configuration settings I apply on low ram servers. Configuring MySQL settings properly can significantly impact your server’s efficiency and responsiveness. In this guide, we’ll walk you through some key configuration directives and considerations to optimize your MySQL server performance. It’s important to…

  • Recently one of the websites on our server has stopped working. when I was looking for a root cause on server logs the error i could see was, So I tried increasing the memory on the server initially it was 1GB. Even after increasing it to 2GB all I could see was the same error.…

  • I am redesigning a website that was written in html before. old website had a html page for every route. for SEO purposes I needed old urls to work. basically the requirement is rewite/ redirect old url to matching route in react application. Below is the code snippet I came up with. This check the…

  • Add above code snippet after the <?php tag in your php file it will display errors on the file. This is a quick way to check errors when you are working. This override the default php.ini settings. Don’t forget to remove it. after you have complete your works.

  • This is a simple method to scroll page to top on route changes. here we are using useEffect to run scrolling function on every path change. Include this snippet in your App.js.

  • Here we have an array of values that has day of the week as a value. what we need to achieve is sort this array from Monday to Sunday. We will create weekdays array with the order of the days we want. If you want Sunday on first you can change the order of $weekdays…

  • Recently I needed to sort list of documents which I have recorded using a acf repeater field the list of documents need to be shown in alphabetical order. After completion it looks like below. Attachments is a ACF Repeater field. It has two subfields, label and filename. we will sort the list using filename. Here…

  • I came across a client website that already has ton of embed YouTube videos. The client requirement was make them responsive. My plan was to add a wrapper around the iframe using javascript and required styling. You can find following css snippet on many sites. including css-tricks.com . follow the link for in depth description…

  • For a recent project that deals with events, I wanted to give users an option to download event details as a PDF. I have considered several PHP pdf generation libraries and finally settled with Dompdf. Dompdf is an easy to user HTML to PDF converter PHP library. It supports CSS styling, inline style tags and…

  • Go to File > Preferences > Keyboard Shortcuts ( Ctrl+K Ctrl+S ) Search for “vim_escape” Edit and repalce “Escape” with “CapsLock” Enter to close the dialog. That’s it. Alternatively you can add config in keybindings.json Press “Ctrl+Shift+P” search for “Preferences: Open Keyboard Shortcuts (JSON)” Add following to keybindings array and save the file.