Get list of all global npm packages installed

Sometimes I get conflicts in path and get confused between globally and locally installed npm packages.

So I need to find out what packages I installed globally.

I googled it and found out how :P (duhhh) Putting here for my reference or may be others can get too.

(–depth – Max display depth of the dependency tree.)

This gives following output

Detailed list options can be found here.

RHOK delhi

FossAsia 2017

First International talk – webRTC: future of video chats

As a part of Mozilla tech speaker squad, I got opportunity to present my talk at FOSSASIA 2017, one of the largest open source conference in Asia.

I spoke about webRTC, my talk covered the basics of webRTC, the structure, usage and how to get started with it. I have given several talks on webRTC in India but this was first time internationally :). The best part of this conference was they recorded each and every talk (mine). Also find my talk slides here.

FossAsia 2017, organized at Science center, Singapore had the best pool participants from different parts of Asia, with different domains expertise. It was an awesome opportunity for devRel and learn.

We also got to setup a booth where we interacted more than 100 devs/day, primarily we promoted Mozilla’s open source webVR framework “AFRAME”. It was readily accepted by emerging devs and well appreciated. We were braced with live demos and devices (thanks Dietrich and Santosh) which helped us to deliver content in best form.

Last but not the least, thanks to complete Mozilla tech speaker team @ FossAsia for working together for whole 3 days and making this event awesome.


Handle Cancel Click on File Input

Ever Tried capturing cancel event on Browse file input type in HTML, tbh there is no direct way to do so :(

But there is a workaround adding a bit of javascript. We can play with onfocus event of the BODY element.

Handle Cancel Click on File Input

Handle Cancel Click on File Input

Example ->



See it working here


Chandigarh SFD

We (me and Kritika) got a chance to represent Mozilla on software freedom day at Panjab University, Chandigarh. Chandigarh is city beautiful and there have been several events before but still struggling to form a well shaped community there.

So we planned to introduce Mozilla to students in most interactive way. We split our session into 4 major parts.

  1. Mozilla and its Mission – Kritika
  2. Contributions – how and why – Trishul [slide]
  3. Moz VR – Kritika
  4. Web compatibility – Trishul [slide]


So I must acknowledge that it was quite hectic and random for me. I drove from Delhi to Chandigarh and reached there by 11 and I have to deliver talk at 2:00 PM. But the enthusiasm in the attendees charged me up like anything.

We delivered the content along with few Ice breakers Like (Free Applaud, Rule of Seven) and it worked liked charm, attendees got loosened up and the mode of session changed from talk to conversation. The attendees could actually relate to us and were super excited to know about Virtual reality and web compat, some of the attendees actually filed few bugs on the spot on \o/

By end of the session we were flocked by the queries how to get started with Mozilla and be a volunteer for Mozilla. So we are planning to setup a Mozilla Club soon in the Panjab University and can mark the initiation of Mozilla Chapter in Panjab university.

So yeah after wrapping up the event we searched for best chicken in the town and had some “Sundar Khana” :P cc-Tanish. And then somehow wanderlust struck me (as usual) and next day I left for Kasauli.


All Hands 2016 London

It all started with a talk which I attended just to kill sometime, and now 3 years after that here I am packing my bags to attend All Hands with the team I have been working with virtuallly, in the other corner of the world.
Mozilla, 3 years back was just Firefox – The Browser for me, but gradually it turned out to be a mission of which I am a part. I can proudly say I owe my knowledge, my career, my vision to Mozilla. When I started to get involved with mozilla I not only started contribution to open source but to my life as well. Its a journey from no one to someone.
I started my contributions with SUMO, L10n, but app development was something that always tempted me. I started as an app developer for Firefox OS, then became app-reviewer, i also coded for markeplace and eventualy became code mentor for the same. While I attended All hands – dec -2016, I got the to know about discontinuation of Firefox OS for smartphones. I was literally in state of shock.
But then I realized that it is not the end. I shifted my contributions to addons and a new found project Web Compat. Now these two projects has much to keep me occupied. And working with the team is really like grooming yourself.
Hoping that this Allhands will surely help to take my journey with Mozilla to a new level.


Makerfest 2016

One of the best opportunity to represent Mozilla at a place filled with innovative makers from all over India.

3 days Event

3000+ Attendees

Age 10 years to 60 years

It was a three day event where various makers have their booth setup to showcase their innovation. We too setup a booth to spread Mozilla mission and online privacy. We team of eight, from various part of India, never met before were jelled up as we have been together for long. With the booth setup we were ready for the event.

Day 1 –


The event started with few people visiting random stalls. Then came the groups of school students – super curious, super excited. While visiting various stalls they were amazed to learn many new things. On our stall they spent the most time as they learnt things about internet- their basic need . we explained them about open source, online privacy, how they are being tracked, best measures to ensure their online privacy, etc.

To our surprise we even got privacy tips from the attendees. And we dedicated a complete section on “Ahmedabad on Privacy”. In addition to that we even got suggestions for Firefox browser.


When the day ended we were satisfied but exhausted. But yes Ahmedabad has got a lot to feed and entertain us.

Day 2 –

Once we were done with booth setup, we got a huge crowd from regional colleges, everybody was bowled over by LIGHTBEAM and the tracking protection. We actually show them the tracking done on two different bank sites and tweeted about them, and to our very surprise , the banks tweeted us back with promise to take care of their trackers.









The attendees loved to know about PASSPHRASES and few of them changed their passwords to passphrases right on the spot (reason we almost decoded their passwords by social engineering :P )

And yes they loved the privacy window.


We also got various invitations to start a club in different colleges as there is no Mozilla community in Gujarat.

Again the day ended but again there was something to repeat “Sabarmati River Front”

Day 3-

The final day, now we engaged 6 of us on booth and kept 2 in buffer who can visit all the booths and learn something.


There were various booths and doing amazing stuff.

  • A kid of 6 years coding for aurdino – making drones and robots (Yes 6  years – Saarang from Kerela)
  • Automated chess (Where the coins actually move on board as the computer plays)-
  • A neural gadget which actually track your hand movements and replicat it on computer (basically IRON MAN) –
  • A fun and practical way of learning and teaching physics –
  • A universal remote controlled by your mobile –
  • A women group doing awesome stuff with 3d printers (Jwellery, show pieces, future plan to make bio cells YES bio cells )-
  • Booth for learning quilling
  • Many variations of 3D printers.

The list goes on.

p1 p2   p5














With this I will end the story here and Kudos to the Mozilla team –

Kumaresan Subash (Saat smundar Par)

Prathamesh Chawan (Nice Teets)

Aman Sehgal (Segway segway)

Ankit Mehta (Give away every swag – moving to Australia)

Sanjay Gouri (The chamatkari purush – enough said :P )

Mehul Patel (The rockstar – only for specific gender )

Ashish Mishra (the designer)

Kamlesh Vilpura (the surprise package)

Thanks to Ashish who instantaneously drew all the posters which actually helped us a lot to deliver the content in best way possible.

A special thanks to Kamalesh who actually captured all the moments in his phone.

And yes the backend person – Santosh Vishwanathan,

Love to see more pics ? Click here


enum Vs tinyInt

Long story short ENUM is evil :P

Premature optimization is the root of all evil. Very well put by Chris Komlenic.

Sometimes we over optimize the database schema, as in in terms of data structures. generally we have a dilemma of using Tinyint or enum, while storing values in columns such as ‘status’, ‘isActive’, ‘isTrue’, etc. Its very difficult to assume that the status can be only given values.

If we declare the column as enum it is hell lot problematic to chnage / add and more enum value to that column when the data in table pile up. In that case its just a huge pain, we are helpless and actually we have to block table operations for a while. Which can actually cost your business. But if it were a tiny int, it would be just a new value in the SQL query.

Also while changing the datatype of enum its really pain. The enum is based on indexing and its indexing starts from 1 instead of 0. [WTF]

To clear my point following is content extract from few other blogs

  1. With an ENUM we’re actually storing pieces of data in a place that was only intended to hold crucial information about the model. In short, an ENUM column violates the rules of normalization.
  2. You  create an ENUM column and say “no way NEVER will this list change or need added to”. But humans are really poor at estimating the entire scope of something, and even worse at predicting the future. problem is that changing the member list for an ENUM column restructures the entire table with ALTER TABLE, which can be very expensive on resources and time
  3. ENUM has limited portability to other DBMS.
  4. There’s a reason ENUM is a string data type. Not only should you be using a numeric data type to store numbers
  5. ENUM takes 1 byte (if under 255 values) or 2 bytes (up to maximum of 65,535 – ENUM does take up some metadata for the string value associated with it though
  6. TinyInt takes 1 byte (maximum of 255 values)






[Reference –]