185 TILs and counting...

Use winget to install Git for Windows with Unix tools

For years I’ve been using Chocolately for quickly installing git on new Windows and it’s pretty handy. Recently though I looked into doing the same with winget since it comes built into Windows now which makes it easier to just give to the command to a co-worker. One thing I always do though is enable the option to add the common linux tools to the path. With Chocolately you could just add the /GitAndUnixToolsOnPath param like this: ...

Auto add pull request reviewers

Today I learned that Azure DevOps lets you automatically include reviewers for a pull request if modifies certain files. This is very similar to Github’s code owners file with the key difference being that you configure it through the repo setting in Azure DevOps instead of committing a file. I find this very useful for example if you’re a Front End Architect who wants to be aware of any changes to the UI or if you’re a DBA who wants to review any database migrations.

 · 1 min · 

Link directly to a VS code setting

Today I learned that you can link directly to specific VS Code settings using the vscode: URL scheme. They follow this format: vscode://settings/editor.formatOnSave, where you put the setting ID at the end of the URL. So if you click this link, VS Code should open straight to that setting. This is probably most useful for folks who like to write about VS Code features (like me), but it’s also handy if you’re helping like a teammate you can just send them a link to a setting to make it easier for them. ...

Fixing a bunny led night light

This effectively amounted to replacing a battery but I still learned some things along the way. It was thankfully easy to take the rubber case off which I expected to be glued or something but I just had to pull it off. This revealed the main board with the LEDs and the battery tucked underneath. It turned out to be a 18650 lithium battery. ...

 · 1 min · 

JST connectors

Today I learned that the following white connector you commonly see in electronic devices, is called a “JST connector”.

 · 1 min · 

Semantic line breaks (one sentence per line)

I just discovered Semantic Line Breaks. I could never decide on exactly how to do line breaks in markdown so I love that someone came up with a convention that’s been thought through. This led me to discover this post by Derek Sivers: Writing one sentence per line What’s interesting is that while he’s recommending the same approach, he suggests that it will improve your writing itself. Nicer git diffs is just a side benefit. 🙂 ...

 · 1 min · 

The “Inverted Pyramid” in journalism

Continue with the writing, Today I learned about the inverted pyramid in journalism: It’s a way to structure content so that it “begins with the details that readers care about most. As the article progresses, the focus shifts toward details that are relevant only to the most interested readers.” I came across it in this great post about How to Write Useful Commit Messages but is just as applicable to blog posts/reports/docs/emails. ...

On dashes

I’ve been working on improving my writing and since it’s an important skill in our industry I figured it’s also a category of learnings worth sharing. I’ve been experimenting with using em dashes (—) lately but I just learned that it’s common to not put spaces around it. Spacing around an em dash varies. Most newspapers insert a space before and after the dash, and many popular magazines do the same, but most books and journals omit spacing, closing whatever comes before and after the em dash right up next to it. ...

Run old versions of Angular

Today I learned how to get a very old Angular project running locally. Even though it was Angular in this case, the steps are likely to be similar for most aging node based projects. First I had to go to the Version compatibility page for Angular and find the required version of node. In my case it was Angular v7 so I needed Node v10. Next, you’ll want to use a version manager for node. nvm is the most well known but you have to run it in bash on Windows and I find Volta much nicer to use. ...

You can style markdown links as code

I just figured out that you can style a link as inline code in markdown i.e. toSorted() It’s a bit non-intuitive since, unlike bold or italics, the backticks go inside the square brackets instead of around the entire link. This gives a bold link: **[EFF](https://eff.org)**. This is for italics: *[Markdown Guide](https://www.markdownguide.org)*. And this is for code: [`toSorted()`](https://www.brandonpugh.com/til/javascript/tosorted/). In my testing this seems supported in most places like github and azure devops. Unfortunately I couldn’t find a way get it styled like that in Teams.