10 common usage of lodash

lodash is a excellent tool library for every javascript developer. It is similar to underscore, but smaller. It is always come in handy to keep it in your toolchain.

map

This should be quite familiar for most JS developers. It iterate through a collection and perform a 1-to-1 mapping.

mapValues

mapValues is just like map but instead of the key being iterate Continue reading “10 common usage of lodash”

5 Docker tricks make your life easier – Part 1

1. Logs and monitoring

You can view logs of a container by

And you can monitor output from a container by

2. Open a shell in the container

If you want to quickly dive into the container, Continue reading “5 Docker tricks make your life easier – Part 1”

Android Emulator crash/error when downloading file

When you use Android Emulator with “Marshmellow” (6.0) SDK, and want to download a file with the Browser app. You may get the following situation:

  1. “an sd card is required to download”
  2. Force close

After some struggle, I have found that it is because your browser app has no permission to access the Storage. Adding Storage permission in the Settings will solve the problem.

Cannot start Android Emulator (initial hax sync failed)

If you see something like this when booting Android Emulator:

It is likely that one of the following app is running:

  1. Virtualbox
  2. Docker
  3. Other virtual machine applications

Stop all of them, and try again.