Skip to content

Instantly share code, notes, and snippets.

Investigating a better artifact workflow

Jake Morrison techthoughts2

Investigating a better artifact workflow
View GitHub Profile
ssh -l jake
# read the manual pages - kind of like help
man cp # read the manual on the cp command
man 2 sync # gets you man page 2
manpath # where are man files located
1 User level commands and applications
View monitor_input_switch
Helper function to set the monitor input.
Uses ControlMyMonitor.exe to adjust VPCCode 60 for your monitor input.
Set-MonitorInputSource -InputSource HDMI
Switched to HDMI input
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
View bs-powershell
- 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 = """""";$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'''
techthoughts2 / ps_reddit
Last active Jul 3, 2020
PowerShell based interactive reddit browser. Browse your favorite subreddits using PowerShell!
View ps_reddit
Launches the default browser to display reddit pictures.
Long description
Show-Pics -URL
Launches default browser to provided link.
View argument_completer
function test-arg {
View argument_completer
function Get-Something {
[Parameter(Mandatory = $true)]
[ArgumentCompleter( {
View select_property
$top50 = $community `
| Sort-Object { [int]$_.AdditionalMetadata.downloadCount } -Descending `
| Select-Object Name, @{N = "Downloads"; E = { $_.AdditionalMetadata.downloadCount } } -First 50
View ps1xml
Update-FormatData -AppendPath 'C:\ProjectName.Format.ps1xml'
# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = @(
$item.PSObject.TypeNames.Insert(0, 'The.Name.Here')