Categories
Uncategorized

Add Stylelint to webpack

Adding stylelint to your project has many advantages that range from being able to throw warnings and errors when the styling rules (CSS, SASS-SCSS) are broken, to being able to fix most of your warnings automatically with a single command.

Categories
Uncategorized

How to create an arrow content separator in CSS

Lets say you want to draw something similar to the following using only CSS.

Categories
interview

Format currency and date manually in Javascript

Format Currency

In case you want to implement a function to format currency instead of just using toLocaleString() then, you can use the following.

Categories
interview

Java Objects, Arrays – Pass by Reference?

The array reference here is passed by value to the methods below. This is similar to what we usually see in case of Javascript.

Categories
Uncategorized

Material Modal using CSS3

The following code tries to mimic the look and feel of the modal from Google’s Material Design using CSS3.

Categories
Uncategorized

Restart service if website is down with cronjob

This can be easily achieved on a linux server with the help of a cronjob.

Open up your terminal and edit your cronjobs list using sudo crontab -e.

Categories
Uncategorized

Divide CSS3 Grid into fixed equal columns

Defining a fixed set of equal width items for each row in a grid can be done using the grid-template-columns property in CSS3.

Categories
Uncategorized

Create Schematic using Schematic-CLI from angular-devkit

We can easily create a new schematic which we can use with the help of Angular-CLI in few minutes. Install the required package globally using npm as shown below. You will need node version >= 6.9 for this.

Categories
Uncategorized

Detecting Angular Router State Changes

Detecting Route state changes can be done by subscribing to the router and listening to the events being emitted. In the example below you will see all the router events that you can listen to in Angular.

Categories
Uncategorized

Angular Material with Angular 5

Install the latest version of Angular Material + Animations using npm to get started.

npm i --save @angular/material @angular/cdk
npm i --save @angular/animations