X-Git-Url: https://us-delaporte.pagekite.me/gitweb/dotfiles.git/blobdiff_plain/fcb9de4b2f9d7058686dcd03c989f2c65f0903ec..5a6f185b2159c696c3dab735d6428c63d7ef661e:/Microsoft.PowerShell_profile.ps1 diff --git a/Microsoft.PowerShell_profile.ps1 b/Microsoft.PowerShell_profile.ps1 index c9d6ba2..8c9c6a1 100644 --- a/Microsoft.PowerShell_profile.ps1 +++ b/Microsoft.PowerShell_profile.ps1 @@ -12,6 +12,12 @@ $ENV:PATH+=";C:\ProgramData\chocolatey\bin" # Package management is nice. $ENV:PATH+=";C:\Program Files\nodejs" # KataKoda wants to add tools via npm $ENV:PATH+=";C:\PENGUIN" # Flag to ensure my profile kicked in. + +function Find-LargeFiles() { + Get-ChildItem c:\ -r| sort -descending -property length | select -first 10 name, Length, Location +} + + function Start-Vault() { consul agent -dev # Run in Dev Mode vault sever -config c:\src\dotfiles\vaultconfig.hcl -address=http://127.0.0.1:8200 # Use local dev Consul as storage @@ -48,3 +54,25 @@ function Start-DockerJuiceShop() { docker run --rm -p 3000:3000 bkimminich/juice-shop Write-Host "Vulnerable Juice Shop running on 3000" } + +# Import some home grown PowerShell modules, if they are installed. +$modPaths = @("C:\src\dotfiles\ToyBox\toybox.psm1") +$modPaths | ForEach-Object { + $_ | Format-Table + if(Test-Path -Path $_) { + Import-Module $_ + Write-Host "Loaded $_" + } +} + +function Start-DockerPython3Bash { + docker run -it python /bin/bash +} + +function Start-DockerPython2Bash { + docker run -it python:2-buster /bin/bash +} + +function Stop-Docker { + docker stop $(docker ps -a -q) +} \ No newline at end of file