Programming

Code Katas, why, what, and how?

Code Katas, why, what, and how?

, April 8, 2024

Code katas are like fun challenges for programmers, similar to practice routines in martial arts. They’re designed to help developers refine and perfect their coding skills through repetition and practice. These tasks focus on writing neat and fast code. Usually, developers follow a method called Test-Driven Development (TDD). They start by writing a test that […]

Prisma Migrate: Baselining your existing database

Prisma Migrate: Baselining your existing database

, September 25, 2021

I have been using KeystoneJs for one of my projects. Keystone uses Prisma. I have been putting off using migrations for a while now so, I already have my production site with data and I do not want to lose my data to start using migrations. For this purpose, there is a technique called baselining […]

Upgrading NextJs v11 to 12 hopefully to 13

Upgrading NextJs v11 to 12 hopefully to 13

, April 17, 2023

upgrading NextJs from v11 to 12. Webpack@4 is no more supported so first Upgrade Webpack v4 to v5 Simply run yarn up webpack Try running NextJs yarn dev Still uses webpack v4… Using webpack 4. Reason: webpack5 flag is set to false in next.config.js https://nextjs.org/docs/messages/webpack5 Change webpack5 to true in next.config.js Run NextJs again. ValidationError: […]

Prisma Migrate: Consolidate / Squash Migrations

Prisma Migrate: Consolidate / Squash Migrations

, September 25, 2021

When working on a new feature requiring schema updates, you may end up creating multiple fragments of migrations. This YouTube video explains how you could consolidate or squash these migrations without having to lose your local data.

Building SVG Clock using ReactJs

Building SVG Clock using ReactJs

, May 5, 2021

DEMO: https://df2y4.csb.app/ GitHub: https://github.com/dejavu1987/react-svg-clock This blog post is an exercise from my previous blog post Introduction to Polar Coordinates, plotting on radial diagrams. If you have not read the post and have no idea how radial coordinates work. Please go to the post and read and come back. If you are confident, lets go build […]

Build Minesweeper game using ReactJs

Build Minesweeper game using ReactJs

, April 26, 2021

Here is the demo of Minesweeper game I built using ReactJs. http://react-minesweeper.anilmaharjan.com.np/ I will be creating a step-by-step guide on, all the possible challenges, (hard parts) and the way I approached them. These are just one of the ways we can approach these problems. I appreciate your feedback and PR with suggestions and improvements. The […]

Low waste data modeling using graph

Low waste data modeling using graph

, May 1, 2021

Hello internet, I decided to write this up after presenting a talk about it to my colleagues at Inviqa recently. I will try to walk you through this mindblowing journey of modeling your data from scratch to building a graphQl API, to consuming the API and then serving it in a ReactJs app.

React MD v1 w/ Gatsby No!

React MD v1 w/ Gatsby No!

, November 2, 2020

Please avoid using ReactMD v1 with GatsbyJs, since ReactMD 2 is out with full rewrite, that could be an option if you want to stick with ReactMD. I had started to port this blog from WordPress to Gatsby and I had used React-MD ‘s Gatsby starter to start with the project. Because of issues in […]

ML5 with Webpack and TypeScript

ML5 with Webpack and TypeScript

, October 31, 2020

Why TypeScript? TypeScript allows you to add static typing to your javascript, which adds a possibility to type check on your code during compile time. Even better your IDE itself will be able to tell you if there are any issues with your data types, etc in realtime. Additionally, it can be used by your […]

Docker compose update php.ini

Docker compose update php.ini

, October 24, 2020

How to configure the php.ini in your docker container? Here is how you can update your config files like php.ini, httpd.conf, php-fpm.conf, .htaccess, etc in a docker container through the host filesystem. On the root folder of your project where your docker-compose.yml is, add a new file to replace some config file, in your PHP […]

Gatsby with WordPress

, September 20, 2019

Static site generation Why? When? How? Dynamic sites are slower, expensive, complex, hackable. When? If the site is mostly content and no heavy communication with server to update / calculate content in realtime. Best use case, Portfolio website, company website, blogs, etc. Static site generation with Gatsby Gatsby is powerful tool to create static sites […]

Visual Studio Code: Customize find/search match highlight color

, April 1, 2018

 To customize the highlight color of the find matches in visual studio code go to: File > Preferences > Settings > User Settings and add following to workbench.colorCustomizations and choose the colors. “workbench.colorCustomizations”: { “editor.findMatchBackground”:”#6f7700″, “editor.findMatchHighlightBackground”:”#833d03″ }

© 2025 Anil Maharjan