Steve Mu

This article will show you how we can add Chrome profiles to the dock on Mac so you can launch different profiles quickly.

  1. construct the shell command
open -n -a "Google Chrome" --args --profile-directory="profile name"

you can find the profile name `/Users/stevemu/Library/Application Support/Google/Chrome` folder. For me, it looks like something like this:

For example, the one that worked for me is:

open -n -a "Google Chrome" --args --profile-directory="Profile 10"

2. use Automator to create an application, add “Run Shell Script,” then add the above command to it. Finally, save the application to the Applications folder.



JavaScript engine execute two kinds of tasks in the event loop: macrotask and microtask.

One example of macrotask is event listener callback.

One example of microtask is the then in a promises.

Js engine event loop has two queues: one queue for the macrotask, another queue for the microtask.

It will execute one things from the macrotask queue, then execute everything on the microtask queue, then perform rerender.




If an app is in PCI scope, it needs to draw a diagram for audit. An app is in PCI scope when it processes or transfer payment data. An example would be a textfield for getting credit card numbers. An app with such textfield is in PCI scope.

Putting UI in PCI scope will create a lot of more work, so one solution is to use a an iframe from the backend (which is already in PCI scope) to process payment information.



Gain insight into errors and user behavior with Datadog and Sentry.

Gain insight into errors. You can log errors so you know what errors occurred on the production site. In one of my apps, I log errors that made to the Error Boundary to Sentry.

Gain insight into user behavior. Both Datadog and Sentry provide automatically performance tracking. They can track what path the user has visited so you can get an idea what is most often visited pages are.

For smaller apps, it is probably a good idea to start with Sentry because it is free to use to start with.