🕵️♂️
This file contains hidden or 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
Connect-AzAccount |
This file contains hidden or 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
iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet" |
This file contains hidden or 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
$NumberOfLogicalProcessors = Get-CimInstance win32_processor | Select-Object -ExpandProperty NumberOfLogicalProcessors | |
ForEach ($core in 1..$NumberOfLogicalProcessors) { | |
start-job -ScriptBlock { | |
$result = 1; | |
foreach ($loopnumber in 1..2147483647) { | |
$result = 1; | |
foreach ($loopnumber1 in 1..2147483647) { | |
$result = 1; |
This file contains hidden or 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
ssh 10.0.4.3 -l jake | |
# read the manual pages - kind of like help | |
man | |
man cp # read the manual on the cp command | |
man 2 sync # gets you man page 2 | |
manpath # where are man files located | |
<<'###ManPageSections' | |
1 User level commands and applications |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Helper function to set the monitor input. | |
.DESCRIPTION | |
Uses ControlMyMonitor.exe to adjust VPCCode 60 for your monitor input. | |
.EXAMPLE | |
Set-MonitorInputSource -InputSource HDMI | |
Switched to HDMI input | |
.EXAMPLE |
This file contains hidden or 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
""" | |
Ctrl+K Ctrl+0 Fold (collapse) all regions editor.foldAll | |
Ctrl+K Ctrl+J Unfold (uncollapse) all regions | |
Ctrl+Shift+[ Fold (collapse) region editor.fold | |
Ctrl+Shift+] Unfold (uncollapse) region editor.unfold | |
Ctrl+K Ctrl+[ Fold (collapse) all subregions editor.foldRecursively | |
Ctrl+K Ctrl+] Unfold (uncollapse) all subregions editor.unfoldRecursively | |
""" | |
# region links |
This file contains hidden or 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
- dotnet tool install --global PowerShell --version 7.0.3 | |
- powershell -command '.\configure_aws_credential.ps1' | |
# - aws s3 cp s3://ps-invoke-modules/PowerShell-7.0.3-win-x64.msi PowerShell-7.0.3-win-x64.msi --quiet | |
- powershell -command '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$url = """https://github.com/PowerShell/PowerShell/releases/download/v7.0.3/PowerShell-7.0.3-win-x64.msi""";$output = """$env:CODEBUILD_SRC_DIR\PowerShell-7.0.3-win-x64.msi""";Invoke-WebRequest -Uri $url -OutFile $output -ErrorAction Stop;if (-not(Test-Path $output)) {throw """PSCore failed to DL"""}' | |
- powershell -command "Start-Process $env:CODEBUILD_SRC_DIR\PowerShell-7.0.3-win-x64.msi -ArgumentList '/qn /norestart' -Wait" | |
- '& "C:\Program Files\PowerShell\7\pwsh.exe" -command ''.\install_modules.ps1''' |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Launches the default browser to display reddit pictures. | |
.DESCRIPTION | |
Long description | |
.EXAMPLE | |
Show-Pics -URL https://i.imgur.com/fcuRqwl.jpg | |
Launches default browser to provided link. | |
.EXAMPLE |
This file contains hidden or 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
function test-arg { | |
[cmdletbinding()] | |
param( | |
[ArgumentCompleter({'mouse','house','goat'})] | |
$GreenEggs | |
) | |
$greeneggs | |
} |
This file contains hidden or 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
function Get-Something { | |
param( | |
[Parameter(Mandatory = $true)] | |
[ValidateNotNullOrEmpty()] | |
[ArgumentCompleter( { | |
@( | |
"keys" | |
"wallet" | |
"phone" | |
) |