Homebrew behind a proxy

Hi Guys,

I wanted to write this post as I was facing issues while installing formula use homebrew command on Mac OS behind proxy, finally I was able to do it using info given on this page.

Its really simple just use the http_proxy or https_proxy before the brew install command or any brew command you want to run behind proxy.


https_proxy=https://username:password@proxy:port brew install apache-spark

http_proxy=http://username:password@proxy:port brew install $other_formula

Also one can set the git config settings for http.proxy and https.proxy like below:

git config –global http.proxy http://username:password@proxy:port

git config –global https.proxy https://username:password@proxy:port

These above settings will make sure to pass through proxies while brew connects to git repository.

Enjoy and thanks for reading.


Posted in Uncategorized

What do you think?

I was watching this new Badminton league on Star Sports and started thinking what has started with IPL (India Premier League) and suddenly there are loads of Leagues started around the concept (Auction the player – Buy the player – Earn the profit).

This franchise system has changed the energy of the very game, where it has entered either Cricket, or Football, or Tennis or Badminton. These are few sports which are already in limelight due to the recognition at world level and Olympics. What should intrigue you is the rise of the Indian desi sport Kabbadi. This was considered as the sport of the village and rural area (mostly due to the easily available sand field for making the Kabbadi arena :)).

So come to the point what did really intrigued me to write this blog, that raised the necessity to get the answers. It is what do you think what happens to spirit of the Indian. If you remember Chak De India! movie part where Shahrukh Khan asks every state players their intro and everyone stated that they are from so so state, but he choses Vidhya because she mentioned India in her intro.

So what do you think happens to the spirit of the Fans, Players, normal people who does not take care of what is going all in this sport (because they are already too much in following Soccer, FIFA and FI) anyway who has time to go for the extra stuff. Whether the very spirit of the game raised the very truly feeling of belonging to one Nation India ( rather than they are from so so Delhi, Chennai, Mumbai or so team).

What do you think spirit of the game really raises the feeling of the one truly nation India, among all the Indian players.

Disclaimer : Keep out all the Pros sportsperson as they are already above this spirit, they are already moved to very FORCE of the sport.


Thanks guys reading this, I will be really happy if you can put some thoughts here. May the force be with you.

Tagged with: , ,
Posted in Asia, Game, India

How to For Each in Hash Map in Java 8 using Lambda Expressions

Lambda Expression Java 8

In Java 1.8 (Java 8) this has become lot easier by using forEach method from Aggregate operations(Stream operations) that looks similar to iterators from Iterable Interface.

Just copy paste below statement to your code and rename the HashMap variable from hm to your HashMap variable to print out key-value pair.

HashMap<Integer,Integer> hm = new HashMap<Integer, Integer>();
 *     Logic to put the Key,Value pair in your HashMap hm

// Print the key value pair in one line.
hm.forEach((k,v) -> System.out.println("key: "+k+" value:"+v));

Below is the sample code that i tried using Lambda Expression. This stuff is so cool. Must try.

HashMap<Integer,Integer> hm = new HashMap<Integer, Integer>();

    Random rand = new Random(47);

    int i=0;
        int key = rand.nextInt(20);
        int value = rand.nextInt(50);
        System.out.println("Inserting key: "+key+" Value: "+value);
        Integer imap =hm.put(key,value);
        if( imap == null)
            System.out.println("Replaced with "+imap);

    hm.forEach((k,v) -> System.out.println("key: "+k+" value:"+v));

Also one can use Spliterator for the same.

Spliterator sit = hm.entrySet().spliterator();


Including documentation links to Oracle Docs. For more on Lambda go to this link and must read Aggregate Operations and for Spliterator go to this link.

Tagged with: , , ,
Posted in Guide, Technical

Data Evolution

I was reading this article from Ericsson from their Mobility November 2014 report and got to know some details on Mobile/Data trends and future of the Smart Phone with Data technologies like GPRS/EDGE/3G/4G/5G.

There was one point where they were discussing about data consumed in 2013, 2014 and what will happen in 2020. Before I go further please read regarding Data consumption terminologies at this link http://en.wikipedia.org/wiki/Megabyte

In 2013 mobile data traffic was 2 EB/month and in 2014 it is 3.2 EB/month and in 2020 it will be 25 EB/month that is 40% increase in consumption.

Also number of smart phone devices with LTE/4G capabilities are going to increase and 3G devices will remain constant.

I would really like you guys to over this report once if you want to know about mobile phone and data statistics.



Tagged with: , , , ,
Posted in Analytics

Design Patterns

Cover of "Design Patterns: Elements of Re...

Cover via Amazon

Hello guys,

Last week I got a chance to attend a training on Design Patterns. I would like to share my views on that this is the best way to really learn object-oriented design. After recognizing these Patterns it will improve your coding skills to par and further in future it will make you a good developer.

Prior knowledge of any computer language is required but it will be advantage to those people who have worked upon languages related to OOPs concept. It will be easy for them to co relate their problems and easy design solution to their problems.

1. Design Patterns are solution to common design problems that developers face during designing simple/complex applications and GOF(Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides) Gang Of Four identified those problems and make a series of those solutions as Design Patterns. I would recommend you all to read this book at least.

2. We can divide these 23 Design Patterns into three categories:

3. Structural Patterns are those patterns which are related to composing the classes and objects in order to form larger Structures. One can relate these patterns to common life examples like Bridge, Adapter etc. Let me write down those patterns:

  • Bridge
  • Adapter
  • Decorator
  • Composite
  • Proxy
  • Flyweight
  • Facade

4. Creational Patterns are related with Instantiating the objects, creating the good design concept while coding in order to make their use easy while developing applications, these are:

5. Behavioral Patterns  are related to Behavior of the objects, their communication with the other objects and their methods. Basically algorithmically design of the classes and their methods. These are:

  • Chain of Responsibility
  • Command
  • Interpreter
  • Iterator
  • Mediator
  • Memento
  • Observer
  • State
  • Strategy
  • Template Method
  • Visitor

So guys improve your programming skills as I am doing so right now. Please share your comments and suggestions to improve others.

Books you can read to improve your Design Patterns concept

1.  Design Patterns: Elements of Reusable Object-Oriented Software

2. Head First Design Patterns

Tagged with: , , , , , , , , , , , , , ,
Posted in Analytics, Review, Technical

Financial Dilemna

Is this a start of another Bubble burst – Financial? India is loosing its favourite destination for investment in the world. If you look closely you will find that most of the Blue Chip companies lost significant amount of their market capitalisation. Increasing NPAs(Non Performing Assets), rise of defaulters, reducing profit what does that mean, i mean once Banking stocks were shine of the every quarterly results. Now what else could be the reason and that is concern for middle class like us as the investors. Will you or will you not enter into this hideous, mischievous investment fund driven market?


Good Luck guys.

Tagged with: , , , , , , ,
Posted in Asia, India

Life is tough.

It is you who needs to make the call. Call that will change the path, path of your life to the better life. It leads us to choice, choice of the life that you want to live. Choice comes in two ways, ways which are suitable to us and those which are not. Ways that shows us the path, path that leads us to the desired. Desired makes you feel, feel brings harmony to the Nature. Nature makes you feel the Music, music that creates joy. Joy that is what you wanted in first place.


Tagged with: , , , , ,
Posted in Creativity, God, Nitin Mahesh, Religion

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 496 other followers

October 2016
« Feb    
Blog Stats
  • 1,004 hits