Reading List
The most recent articles from a list of feeds I subscribe to.
How not to update every package in existence, break your local environment, and spend the afternoon dealing with things you did not want to deal with when installing a package with Homebrew
Friendly reminder that you can disable Homebrew's default auto update behaviour with HOMEBREW_NO_AUTO_UPDATE=1
.
HOMEBREW_NO_AUTO_UPDATE=1 brew install git-secret
If you want to set and forget the setting, add it to your ~/.bashrc
or ~/.zshrc
.
export HOMEBREW_NO_AUTO_UPDATE=1
The CSS scroll-margin property
Last week I remembered the scroll-margin
property existed.
I was adding anchors to the headings of a page so visitors can directly link to a section. However, when that link was visited, the heading was glued against the top of the viewport. I prefer some margin between the browser chrome and the text to let it breath.
There's a CSS property for that: scroll-margin
. It does nothing in most cases, but when you visit a URL that points to an anchor on the page, it will offset the element from the viewport.
h2 { scroll-margin-top: 1rem;}
You can read all about scroll-margin
in the MDN docs.
Chris Coyier: '100 people'
An interesting thought exercise on working together, what's the optimal number of people to work as a team without spoiling the broth?
Let’s say you have 100 people. They can break into groups of any size. Each group gets 100 toothpicks. The goal: build the tallest structure with the toothpicks. What is the optimal group size?
How Jim Nielsen takes & publishes notes
I always enjoy reading about other people's processes.
99% of the time, this is how my note-taking process goes:
- I’m catching up on my RSS feed (on my phone in the Reeder app)
- I read something that strikes me as interesting, novel, or insightful.
- I copy/paste it as an blockquote into a new, plain-text note in iA writer.
- I copy/paste the link of the article into iA writer.
- I finish reading the article and copy/paste anything else in the article that strikes me.
- I add my own comments in the note as they pop into my head.
- I move on to the next article in my RSS feed.
- Repeat.
And:
I like to let my notes sit for a couple days (or even weeks). I find that if I come back to a note and still find it interesting/insightful that means it’s worth keeping, so I put in the work of cleaning it up and publishing it.
Time is underestimated as a filter for content.
Cleaning up package.json keys
I'm in the process of cleaning up some npm packages that haven't been touched in a while, and part of that is pruning all the cruft that has been accumulated in package.json
over the years.
I was looking for a canonical order to sort the keys by, and thought the order the npm docs specify the configuration options made sense.
Of course, after manually sorting one package.json
file—which probably took 2 minutes—I decided to spend 30 minutes to find our how I could automate sorting the other two.
Luckily there's an npm package for everything. With the sort-package-json
package you can go sort your package.json
s in a logical order.
npx sort-package-json **/*/package.json
That's all I had to do to keep my monorepo clean and tidy.