Skip to content

Instantly share code, notes, and snippets.

@Abhinav1217
Last active March 13, 2023 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Abhinav1217/fe91ab35f7959f9982b5b266c59399a5 to your computer and use it in GitHub Desktop.
Save Abhinav1217/fe91ab35f7959f9982b5b266c59399a5 to your computer and use it in GitHub Desktop.
Some Usefull Powershell snippets for Linux users who are using windows for office work.

CRLF --> LF Recursively

PS > Get-ChildItem -File -Recurse | % { $x = get-content -raw -path $_.fullname; $x -replace "`r`n","`n" | set-content -path $_.fullname }

Force remove .git folder without any error

PS > Remove-Item -Recurse -Force 

Generate sln file for dotnet project and add all .csproj recursively

PS > dotnet new sln
PS > Get-ChildItem -Recurse *.csproj | ForEach { dotnet sln add $_.FullName }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment