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.
With the amount of documents that go in and out of my kindle, the documents folder is constantly left in a rumpled state–the book record
*.sdr files scatter all over the place. I wonder why the kindle system can’t just delete the record file when the book is deleted?
Finally I decided that I’ve had enough of deleting and wrote a ruby script to deal with the mess.