168 TILs and counting...

Quickly Fix A Misspelled Word

I just learned that you can have automatically fix a misspelled word with the top suggestion by typing: 1z= This is opposed to the regular z= command for opening the regular list of spelling correction options. Like Josh who I learned this from, I usually pick the first option so this is a bit more convenient.

Sudo for Windows

I just learned that Windows now has a builtin sudo command. You need to enable it from the Windows developer settings and then you use it similar to sudo on other operating systems. I’ve been using gsudo for some time and I still prefer as it overall has a nicer experience and is more fully featured, but if you’re looking for one less thing to install then the builtin sudo is decent. ...

Use skip-worktree to ignore modified files

Today I learned about the --skip-worktree command in git which will treat a file like it hasn’t been modified. This is useful if you have to modify a file locally but don’t ever want to commit it (config files are a common scenario). Like me you have seen --assume-unchanged used in this way but that’s not what it’s meant for since it’s “designed for cases where it is expensive to check whether a group of files have been modified”. As a result you’re likely to lose the changes you have made to those files. This post shows a good summary of the outcomes of common operations with each command. ...

Quickly react to recent message in Slack

Today I learned that you can react to the most recent message just by adding +. So you can type +:thumbsup: as the message it add it as a reaction to the most recent message instead of an individual message. You can also type ⌘⇧\ or ctrl⇧\ to open the emoji picker on the message.

 · 1 min · 

Move a line with :m

Today I learned that you can move the current line up or down with :m. :m +1 - moves down 1 line :m -2 - move up 2 lines I’m used to using dd followed by a movement and then p but I may try this alternate method.

Install SQL Server from the command line

I recently had to setup a new windows dev machine with a local instance of SQL Server and it turns out you can run it completely from the command line although it’s not very obvious how. Once you download the installer it will extract everything to a folder which contains the SETUP.exe executable which you can run from the terminal and pass all the options you want instead of clicking through the UI. ...

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 · 

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 ·