Skip to main content

· 2 min read
Hung Viet Nguyen

Sometimes during development, you might encounter situations where console.log has been overridden. This commonly happens in production builds where logging is disabled to prevent exposing sensitive information or to improve performance. However, when debugging, you might need to restore the original console.log functionality.

· One min read
Hung Viet Nguyen

Recently, I migrated a documentation page from Gatsby to Docusaurus. However, after I deployed a new version of the docs but I still see the cached version of the old docs. The reason is that the Gatsby version of the docs has a service worker that caches the artifacts. So, I need to remove the old service worker manually via Chrome Devtools.

· One min read
Hung Viet Nguyen

In some scenarios, you may want to customize the HTML in Jest to align with your actual app's HTML structure. You can do it by one of the following options:

· One min read
Hung Viet Nguyen

git -c user.useConfigOnly=true commit --quiet --allow-empty-message --file - error: cannot run gpg: No such file or directory error: gpg failed to sign the data fatal: failed to write commit object

Answer:

git config --global gpg.program "$(which gpg)"