Category: Web development

  • You’ve been working on a feature branch, made some local config changes you don’t want to commit, and now you need to switch branches to hotfix a production bug. Git throws an error: “Your local changes would be overwritten by checkout.” You have two options: commit your half-finished work or lose your changes. Neither sounds…

  • If you’re sending arrays to a backend API via FormData, the difference between indices: true and indices: false can break your integration—or fix it. The Problem When you convert a JavaScript object with arrays to FormData, you get different key formats depending on whether indices are enabled: Without indices: true: With indices: true: Both look…

  • Real-world applications often split related data across multiple tables. You might have products for physical inventory and digital products for downloadable items. Both share common fields like name and price, but they live in different tables with different structures. The challenge is simple: list them together, paginated, with full Eloquent relationships working. This is where…

  • On my Christmas break ’24 I have been playing with alpine.js it is a minimal JS framework with nice functionality. A Greetings card generator was the hobby project I did. I have used tailwindcss for the styling along with alpine I have added, I will share more details on development process sooner. I have hosted…

  • If you’re a developer or a heavy terminal user, you know how essential the Escape key can be. Often, having it in a more accessible location, such as the Caps Lock key, can significantly improve your workflow. In this blog post, I’ll guide you through remapping the Caps Lock key to function as the Escape…

  • 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.