I found this link in one of StackOverflow answers–very useful in understanding how git works.
Author Archives: lucia
Git Submodule Life-Saving Setup
What’s the use of git submodules? It’s mostly useful when you want to work on the code in both the main repo and the sub repo at the same time. Otherwise, a normal dependency management system would suffice.
To have submodules safely set up so that you run into walls less often, do the following:
Continue readingHow to Delay ASS Subtitles
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 readingReact: How To Prompt User of Unsaved Data before Leaving Site
There’s a specific function for this: beforeunload
.
Yarn Upgrade All Dependencies to Latest
For reference:
yarn upgrade-interactive --latest
And use a
key to select all of them.
Bound Data Doesn’t Update when Dynamically Updating D3
One big gotcha: select
actually has side effects. It updates the bound data.
Fix: Some FontAwesome Unicodes Show Up as Squares
If some of the unicodes work, but not others:
Continue readingMongoose Unique Not Working?!
Say we want the email
field on our User
model to be unique, so we set the Schema to be:
const UserSchema = new Schema({
email: {type: String, required: true, unique: true}
});
Somehow, it just doesn’t work. As it turns out, there are plenty of reasons why this wouldn’t work. Let’s see which one got you.
Continue reading