Skip to content

Instantly share code, notes, and snippets.

@awright18
Created April 22, 2020 14:51
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 awright18/9efbf4173315d6da72d538d8025ed192 to your computer and use it in GitHub Desktop.
Save awright18/9efbf4173315d6da72d538d8025ed192 to your computer and use it in GitHub Desktop.
Powershell Profile
Import-Module posh-git
Import-Module oh-my-posh
Import-Module MSTerminalSettings
Set-Theme Paradox
function Restore-CleanAndBuildSln
{
gci *.sln | nuget.exe restore
gci *.sln | Invoke-MsBuild -MsBuildParameters "/target:EnsureNuGetPackageBuildImports;Clean;Build"
}
Set-Alias rcb Restore-CleanAndBuildSln
function CleanLocalGitRepo
{
git checkout master; git remote update origin --prune; git branch -vv |
Select-String -Pattern ": gone]" |
% { $_.toString().Trim().Split(" ")[0]} |
% {git branch -d $_ }
}
Set-Alias Get-GitClean CleanLocalGitRepo
Set-Location c:\git
Get-MSTerminalProfile -Name "Windows PowerShell" | Set-MSTerminalProfile -BackgroundImage C:\users\awright\Pictures\launch.gif
Start-Sleep -s 4.5
Get-MSTerminalProfile -Name "Windows PowerShell" | Set-MSTerminalProfile -BackgroundImage C:\Users\AWRIGHT\Pictures\steady.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment