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 […]

Introduction to Polar Coordinates, plotting on radial diagrams

Introduction to Polar Coordinates, plotting on radial diagrams

, May 5, 2021

Trigonometry “the foundation” the branch of mathematics dealing with the relations of the sides and angles of triangles and with the relevant functions of any angles. Google Basics of Trigonometry Trigonometry in its core has a very simple foundation. Although being so simple, it blows my mind that its the base to all the complex […]

Working with pixels – Bitmaps encoding, decoding, manipulating, and everything in between

Working with pixels – Bitmaps encoding, decoding, manipulating, and everything in between

, April 14, 2024

So, you might already know I like working with embedded devices. Most of the time you want a display device for your device for obvious reasons. You will have to work with graphics to create a user experience that is a bit more friendlier than a CLI. Showing Icons, boxes, lines, circles, etc. I started […]

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: […]

SQL to get Products and related data from PostgreSQL

SQL to get Products and related data from PostgreSQL

, October 19, 2021

The objective of this exercise for me was to dump all the product data as CSV / JSON so I could index them into Algolia. The exercise consisted of multiple steps to get to the required form of data. I will run through all those steps and explain what is happening.

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.

JavaScript Tutorial for Beginners

JavaScript Tutorial for Beginners

, August 28, 2021

I have tried to put together a video tutorial series on YouTube. Please support by subscribing to my YouTube and leaving your feedback on the videos.

Heroku PostgreSQL database backup and restore

Heroku PostgreSQL database backup and restore

, May 29, 2021

If you are new to Heroku and PostgreSQL and need to backup/restore data to and from your PostgreSQL database in Heroku, it might be overwhelming to get it right. This post has everything you will need to do just that.

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 […]

PiMP Ping-pong / table-tennis Management Platform with real-time scorekeeping function

PiMP Ping-pong / table-tennis Management Platform with real-time scorekeeping function

, November 27, 2020

PiMP, also known as Ping-pong Management Platform is a one-stop solution to manage table-tennis matches. It consists of a beautiful GUI accessible on your browser built with the latest technology stack. It helps manage your Players’ data, matches data, and tournaments, and even lets you scorekeeping the table tennis match in real-time. PiMP offers real-time […]

Machine Learning – On your Browser

Machine Learning – On your Browser

, October 21, 2020

Inviqa Engineering CoP 22.10.2020
Machine Learning on your Browser.

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 […]

Javascript reduce function on array of objects

Javascript reduce function on array of objects

, May 18, 2018

Array.reduce() function in javascript is one of the most interesting functions, but it may be tricky if you haven’t worked with it on an array of objects.

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″ }

© 2024 Anil Maharjan