React / TypeScript

Using tableLayout CSS property with TypeScript

Tagged , Leave a Comment on Using tableLayout CSS property with TypeScript

Using table-layout property with React and TypeScript was giving a type error like below: ERROR in /var/jenkins/workspace/dev/resources/packages/sites/table.tsx [tsl] ERROR in /var/jenkins/workspace/dev/resources/packages/sites/table.tsx(79,25) TS2322: Type ‘{ padding: number; width: string; margin: string; tableLayout: string; […]

READ MORE

Web Development

CSS Flip Animation for Font Awesome Icons

Tagged Leave a Comment on CSS Flip Animation for Font Awesome Icons

This flip animation will be a perfect use-case for enable/disable UI actions. We’ll be using rotateY transform function to achieve this flip animation. Here is a simple HTML page with a few […]

READ MORE

Elasticsearch

Shrinking indices in Elasticsearch

Tagged , Leave a Comment on Shrinking indices in Elasticsearch

The Problem Today, we started receiving the following error from our production Elasticsearch cluster when a new index was about to be created: The error description was obvious that we would breach […]

READ MORE

AWS

Static Websites with AWS CloudFront and S3

Tagged , , Leave a Comment on Static Websites with AWS CloudFront and S3

Why CloudFront & S3 is better for hosting static sites? AWS CloudFront is a CDN that can be used to serve static HTML sites backed by S3 storage. S3 storage is very […]

READ MORE

Java

MojoFailureException: Fix Maven’s Compilation Failure:

Tagged , Leave a Comment on MojoFailureException: Fix Maven’s Compilation Failure:

Today, I faced a compilation failure in Bitbucket pipelines for a simple Java project. The project compiles successfully in the local machine. The stack trace of the failure was not useful at […]

READ MORE

IntelliJ / MySQL

IntelliJ – Connect to MySQL running in Vagrant

Tagged Leave a Comment on IntelliJ – Connect to MySQL running in Vagrant

The Database feature of IntelliJ/PHPStorm is very powerful compared to the MySQL CLI. It allows your edit your data from the UI easily without writing any MySQL commands. Here is how you […]

READ MORE

React

React – Render String with HTML tags as HTML

Tagged , , Leave a Comment on React – Render String with HTML tags as HTML

There are often times when you have a string with some HTML tags such as strong that you want to render as HTML on the DOM. Most solutions online recommend using dangerouslySetInnerHTML […]

READ MORE

PHP

Debug slow PHP applications using IntelliJ or PHPStorm

Tagged , , Leave a Comment on Debug slow PHP applications using IntelliJ or PHPStorm

It is frustrating when your PHP application is really slow and you do not know which part of your code is taking up too much time. Google considers 2 seconds as the […]

READ MORE

Database / MySQL

5 Reasons MySQL Foreign Key constraints fail to create

Tagged Leave a Comment on 5 Reasons MySQL Foreign Key constraints fail to create

Finding out why Foreign key creation fail When MySQL is unable to create a Foreign Key, it throws out this generic error message: ERROR 1215 (HY000): Cannot add foreign key constraint – […]

READ MORE

jQuery / Web Development

jQuery DataTable: Sorting dynamic data

Tagged 1 Comment on jQuery DataTable: Sorting dynamic data

jQuery DataTable is a powerful library to super charge your HTML tables. By default DataTable can sort your data based on the content of the cells. But if you are loading your […]

READ MORE

Spring Boot

Fixing slow Bcrypt and BasicAuthenticationFilter.doFilter

Tagged Leave a Comment on Fixing slow Bcrypt and BasicAuthenticationFilter.doFilter

I recently investigated and fixed a performance issue with user authentication in our Spring Boot based API service. Our users started complaining about random 504s from our service. Looking at our thread […]

READ MORE

CI/CD

Jenkinsfile – Cheat sheet, Examples & References

Tagged Leave a Comment on Jenkinsfile – Cheat sheet, Examples & References

All of these examples were tested with the ‘Multibranch Pipeline’ type jobs. This may not work with other types of jobs in Jenkins. Validate Jenkinsfile for syntax Navigate to the directory which […]

READ MORE

PHP

Vagrant Remote Debugging – Xdebug 3 & IntelliJ or PHPStorm

Tagged , , Leave a Comment on Vagrant Remote Debugging – Xdebug 3 & IntelliJ or PHPStorm

Debugging is one of the most efficient ways to investigate an unexpected behaviour. This post details how to setup a debugger for a PHP application running in a vagrant machine via your […]

READ MORE

Productivity

iTerm2 – Clear scrollback automatically on a schedule

Tagged , Leave a Comment on iTerm2 – Clear scrollback automatically on a schedule

iTerm2 is my default terminal and have been using it for close to 8 years now. It is highly customizable and has API support for hackability. I was using it today to […]

READ MORE