Blog

Creating slim docker images for react apps

In this blog post, we will create a slim, production ready docker image for a react application. This process is often termed as Dockerization or containerization in developer communities. Containerization helps create portable and reproducible builds of your application that are easy to ship and deploy to any compliant host environment. Containerizing a React app To do so, we will leverage multi-staged docker builds and to keep the image size smaller, we will use alpine variant of popular docker images.

Mapping My Ladakh Road Trip

Back in May, I went on a week long road trip with two of my friends and we clicked a ton of photos along the way. The goal of this exercise is to visualize those photos on an interactive map. Planned route starting from Delhi and ending at Pangong Lake. I started by curating all the photos and dumping them in a directory. The next step is to write a nodejs script to process these files.

A quick glimpse of what's new in ES10

Here’s a quick glimpse of all the TS10 features, that are part of the spec and have already been shipped with the latest version of Chrome: Trim whitespaces only from start of a string " My String ".trimStart() // Produces: "My String " Trim whitespaces only from end of a string: " My String ".trimEnd() // Produces: " My String" Flatten an array: [1, 2, 3, [4, [5, 6]]].

Generate vector tiles with built-in postgis functions

This blog post explores the possibility of generating, caching and serving vector tiles on the fly, from a PostgreSQL database, using built-in PostGIS functions ST_AsMVT and ST_MakeEnvelope. 1. Setup a test database Let us begin by firing off a db instance. We use docker for this because of its easily reproducible and disposable nature. We also use docker-compose because we want to be able to orchestrate multiple containers such as database, caching and other services.

Setting up Slash commands for Slack workspace

Slack has become one of the most popular chat and collaboration tool in software industry. Slack offers all kinds of custom integration, third party apps and a huge scope for automation of trivial every tasks. In this post, we will try to set up a slash command /hello for our slack workspace that makes a request to a REST API and displays response back on the slack channel. The REST API can then trigger other APIs, automate something trivial like initiating a project build or even book an uber.

WebVR With A-Frame

WebVR WebVR is an emerging technology that enables virtual reality experience to be delivered and experienced from within a web browser. WebVR is mostly composed of experimental Javascript APIs supported by browsers such as Firefox and Chrome and VR headsets such as Oculus Rift, Google Daydream etc. WebVR can be used to build all kinds of VR experiences such as presentations, stories, walk-through guides, maps, architectural design demos, games and anything else one can envision.

Træfik, reverse proxy, HTTPs and more

I stumbled upon Træfik last week while working with a client. It is a lightweight, robust HTTP reverse proxy and load balancer. Træfik is simple enough to get started with, within minutes and offers a variety of features such as: Deploy Traefik using a tiny go binary or docker image. Serve as a reverse proxy for multiple micro-services. Supports several back-end systems such as Docker, Kubernetes, Consul, Amazon ECS and more.

Puppeteer - quick start guide

Puppeteer: quick start guide The team behind Google chrome has recently released puppeteer, a nodejs library for controlling Chrome headless. Chrome headless was first shipped with Chrome v59 and has been a huge success with browser automation and testing community. This post is a guide to quickly getting started with puppeteer and headless chrome for browser automation, testing and web-scrapping. Quick start Begin by installing nodejs version 7.6 or later. I use nvm to install and manage different versions of nodejs and it works great!