Created
March 1, 2022 18:47
-
-
Save michaeljolley/e65a1a46477a85ecff7f660eee02fa25 to your computer and use it in GitHub Desktop.
Powershell user profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-Expression (&starship init powershell) | |
Import-Module Terminal-Icons | |
Import-Module devtoolbox | |
Import-Module PSReadLine | |
Set-PSReadLineOption -PredictionSource History | |
Set-PSReadLineOption -PredictionViewStyle ListView | |
Set-PSReadLineOption -EditMode Windows | |
function fact { | |
irm -Uri https://uselessfacts.jsph.pl/random.json?language=en | Select -ExpandProperty text | |
} | |
function joke { | |
irm https://icanhazdadjoke.com/ -Headers @{accept = 'application/json'} | select -ExpandProperty joke | |
} | |
function 2C { | |
param ( | |
[Parameter()] | |
[Alias('Temp')] | |
[int] | |
$Temperature | |
) | |
($Temperature - 30) / 2 | |
} | |
function 2F { | |
param ( | |
[Parameter()] | |
[Alias('Temp')] | |
[int] | |
$Temperature | |
) | |
($Temperature * 2) + 30 | |
} | |
function update { | |
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI" | |
} | |
function profile { | |
code $profile | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment