Sometimes we need to test localhost out on a public URL, for various reasons. We can do that with ngrok, which is a service that projects localhost ports onto a generated public URL.Continue reading
I was watching a series and had to shift my subtitles by 38 seconds every time I open a video. After a few times of pain, I ended up writing a script to cut the crap, have some fun, and get a bit into NodeJS file I/O! 😀Continue reading
- Then sync files onto server and deploy (e.g., running
yarn run buildor any other scripts)
I’m on DigitalOcean’s server, but this works on any self hosted servers.Continue reading
How do I merge HTML files?
To save the uncommitted changes:
# Either without a name $ git stash # Or with a stash name: $ git stash save funny-stash
Sometimes when we pull from upstream origin in terminal, we see git prompting to enter vim. And if we left it hanging there and went ahead committing somewhere else, it would treat all those changes in master as your own contribution, because merge didn’t happen before commit.
$ git diff > file_name.diff
$ git apply file_name.diff
Error: listen EADDRINUSE :::3042
We just need to kill whatever that’s on the port. Probably the last exit wasn’t clean. Do:
$ lsof -i :3042 // to find out the PID number $ kill -9 PID // kill the process with its PID
On mac, the key “D” opens the FileMerge compare automatically.