Skip to content

Instantly share code, notes, and snippets.

View hmlimkokhoe's full-sized avatar

Kok Hoe Lim hmlimkokhoe

  • Munich, Germany
View GitHub Profile
@hmlimkokhoe
hmlimkokhoe / ide_troubleshoot.md
Last active October 20, 2022 12:39
Troubleshoot tips for IntelliJ

Cannot find module error on WSL

If you get something like typescript: Cannot find module 'react' while working on IntelliJ with WSL, there's a chance you haven't set your Node.js interpreter.

  1. Open Settings and go to Languages and Frameworks | Node.js.
  2. Select Node interpreter. Then, set the path of your Node.js installation to something like below:
\\wsl$\Ubuntu\home\my_name\.nvm\versions\node\v14.19.0\bin\node
@hmlimkokhoe
hmlimkokhoe / ci-cd.md
Last active December 8, 2022 11:07
Useful commands for docker and git.

Docker

  • Create a Docker image: docker build -t my-tag .
    • -t my-tag Give your image a tag "my-tag"

git

  • Revert last commit but keep changes: git reset --soft HEAD~1
  • Revert all changes: git reset --hard
  • Create and switch to new branch but keep changes: git checkout -b new_branch

Branch switching