VS CODE TIP OF THE DAY and also painful note to self: Quokka is super cool but if you leave it running while working on code that fiddles with the file system it can fuuuuudge things up.
Week 3 of the Great Appliance Acquisition of 2018: took receipt up to Lowe’s, explained that they’d delivered a Samsung instead of a Frigidaire. They’ll swap the right for the wrong here in a couple days. 🤨
…and then all of a sudden you really look at the box on the floor and realize Lowe’s delivered a Samsung microwave, not the Frigidaire we paid for. (They even hand-wrote our name on the box; clearly not my fault except the part where I didn’t notice for 10 days.)
November 28, 2018
Recently implemented a
draft repo to which my micropub endpoint publishes, instead of going straight to
master and triggering an automatic rebuild. (core reason: I need to hand-edit OwnYourGram posts before pub). After editing .md files in draft, I was occasionally forgetting to manually move them from one subdirectory to another before asking Gatsby to rebuild the site. Then I’d notice, fix the subdirectory issue, but m.b would sometimes already have the
domain/*draft*/post-slug in its cache. “Fixing” the issue created a double-post from m.b’s perspective, because it subsequently found
Anyway I just added a ‘pre-push’ hook to the repo. The hook runs a quick Mocha test that uses
fs.readdir() to make sure the to-edit subfolder is empty. If I edit the .mds but forget to move them, it refuses to push the code.
Plenty more room to improve; maybe automate that file-move if I forget? The problem would go away entirely if I could tweak the micropub-to-github package to add some custom bits to each OwnYourGram post… TBD.