Export user list in firebase

To export the user list from firebase with the user details run the below command in the terminal

npm install -g firebase-tools

After installing firebase-tools run the below command

firebase login:ci 

It would return a token as below

token - tokenval

Now run the below code in the terminal to get the user list

firebase auth:export export_list_name.csv --format=csv --project databasename  --token tokenval

Elastic search

Install Elasticsearch

You can install the Elasticsearch Debian package with:

sudo apt-get update && sudo apt-get install elasticsearch


Editing the configs

Once installed, open /etc/elasticsearch/elasticsearch.yml as root.This is the config file where we can edit the settings

sudo vi /etc/elasticsearch/elasticsearch.yml


Start Elasticsearch

To start elastic search run the below command

sudo /usr/share/elasticsearch/bin/elasticsearch start

Check Status

sudo systemctl status elasticsearch

Starting with Redis in ASP.NET

What is Redis
Redis Cache is a NoSQL key-value database that runs entirely in memory. As a database that runs in memory its very fast,faster than typical database systems

Why use Redis Cache
The speed advantage of Redis means that there is much less performance overhead when reading and writing data. If you have an application that needs to store/cache lots of data and you have memory to spare then Redis might be exactly what you are looking for.

License and Cost
Its free to use for both non-commercial and commercial uses under the BSD license

Why not caching
Redis has great advantages over traditional memory caching,it persists to disk and its data is available across applications rather than a single process.

Read More…

Strategy Design Pattern

Strategy design pattern is a behavioral design pattern.In theory,the Strategy Pattern means:

A family of algorithms, encapsulates each one, and makes them interchangeable. Strategy lets the algorithm vary independently from the clients that use it.

To implement this pattern our system code will be divided into the following components
Read More…

Should you use both AngularJS and ASP.NET MVC together?

One of a common question that new users come up is that should we use both AngularJS and ASP.NET MVC together in a project.Both these are based on MVC frameworks so should we use them both in same application.If so when and if not why?

Well the answer to this question is based on the type of application you are building.If you are building a single page application (SPA), then you probably don’t need the “MVC” in ASP.NET MVC. Views, especially dynamic views, are likely delivered/manipulated client-side. Angular handles that just fine.

Read More…

Design Patterns – Factory Method Pattern

Factory method pattern is a creational Pattern.By this we mean it is used to create objects. People usually use this pattern as the standard way to create objects

What is Factory Method Pattern?
Factory Method Pattern is a pattern by which we develop an abstraction which hides the logic for creation of an object

Factory Method Pattern has four building blocks

ProductBase
ConcreteProduct
FactoryBase
ConcreteFactory

ProductBase
This the abstract class or an interface for the products that would be created by the factory
Read More…

Assign static IP Address to Ubuntu box

Below are the steps to assign static IP address to a box running on Ubuntu OS.

Step 1 : Identify Ethernet Interfaces

To quickly identify all available Ethernet interfaces, you can use the ifconfig command as shown below.

ifconfig -a | grep eth
ens150 Link encap:Ethernet HWaddr 00:15:c5:4a:16:5a

Now open interfaces using a text editor to update as below

sudo vim /etc/network/interfaces

Read More…