Programming

SQL to get Products and related data from PostgreSQL

SQL to get Products and related data from PostgreSQL

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

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.

Prisma Migrate: Baselining your existing database

Prisma Migrate: Baselining your existing database

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

JavaScript Tutorial for Beginners

JavaScript Tutorial for Beginners

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

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

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

Introduction to Polar Coordinates, plotting on radial diagrams

Introduction to Polar Coordinates, plotting on radial diagrams

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

Low waste data modeling using graph

Low waste data modeling using graph

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.

Build Minesweeper game using ReactJs

Build Minesweeper game using ReactJs

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

PiMP Ping-pong Management Platform

PiMP Ping-pong Management Platform

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

React MD v1 w/ Gatsby No!

React MD v1 w/ Gatsby No!

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

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

How to configure the php.ini in your docker container On the root folder of your project where your docker-compose.yml is add a new file to replace some ini file in your PHP container. Then on your docker-compose.yml file add a volume to your PHP container volumes: -./your_local.ini:/etc/path/to/the/ini/you/want/to/replace/with.ini Then restart your docker container with –build flag […]

Machine Learning – On your Browser

Machine Learning – On your Browser

Inviqa Engineering CoP 22.10.2020
Machine Learning on your Browser.

Gatsby with WordPress

Gatsby with WordPress

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

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

Visual Studio Code: Customize find/search match highlight color

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

CSS targetting for IE 10+ excluding Edge

CSS targetting for IE 10+ excluding Edge

Use the following media query to target your css particularly for IE10+ browsers @media all and (min-width: 64em) and (-ms-high-contrast: none), (-ms-high-contrast: active) { /* IE10+ CSS styles go here */ }

Angular | Watch an object or an array

Angular | Watch an object or an array

  $scope.$watch(‘objectOrArray’,function(newVal, oldVal){ // Do Something },true);  

Apache2 on Ubuntu ignores sites-enabled conf (vhost config)

Apache2 on Ubuntu ignores sites-enabled conf (vhost config)

I am using Vagrant to host my local dev environment in Ubuntu. I found this issue, Apache2 on Ubuntu ignores sites-enabled *.conf After few tries figured out, you need to edit the default 000-default.conf file and comment out the configurations there or just delete the file.

AngularJS problem : Links cant load page from server but uses ng-route

AngularJS problem : Links cant load page from server but uses ng-route

If you are using ng-route and want to load the page from your server you need to add target=”_self” to your anchor tag. Example: LINK

Intel Edison
Arduino Development and Innovation in Nepal

Arduino Development and Innovation in Nepal

WHAT IS ARDUINO? Arduino is an open-source electronics platform based on easy-to-use hardware and software. It’s intended for anyone making interactive projects. State of open source hardware development in Nepal Challenges and obstacles in development and innovation in Nepal What can be done to solve the issue of opensource hardware development and innovation in Nepal? […]

Paging a long text into a specific size document like pages using javascript

Paging a long text into a specific size document like pages using javascript

Here is a tutorial about creating  pages with specific height and width out of a very long text to give a microsoft word or other document editor type look using javascript and jQuery. 

Using gradient stops and transparency to dynamically fill circle partially in svg using d3js

Using gradient stops and transparency to dynamically fill circle partially in svg using d3js

Using gradient stops and transparency we can fill circle partially in svg. Doing this dynamically using data may be great visualization tool. We will use d3 to do this.

Create filled circle to visualize data using svg

Create filled circle to visualize data using svg

Here is how to tutorial on creating filled circle to visualize data using svg and tiny bit of javascript.

An illegal choice has been detected in drupal select field|Bypass validation for ajax loaded options

An illegal choice has been detected in drupal select field|Bypass validation for ajax loaded options

Error : An illegal choice has been detected. Please contact the site administrator.

while trying to use ajax to load dynamic options in select field in drupal form api. Using Auto load on scroll of table select will give same error.