Get a .gitignore file for Visual Studio fast with gitignore.io and Powershell

I often use the wonderful service at https://www.gitignore.io to grab a .gitignore file suitable for Visual Studio use. Unfortunately, the file has unix line endings – so I’ve boiled the operation down to a single line of Powershell that sorts that out in one go:

(curl https://www.gitignore.io/api/visualstudio).Content
  -split "`n" -join "`r`n" | set-content .gitignore