Skip to content

Instantly share code, notes, and snippets.


Cory Knox corbob

View GitHub Profile
View hyper.js
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See for all currently supported options.
module.exports = {
config: {
opacity: 0.8,
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'stable',
corbob / ci.ps1
Created Jan 12, 2019
install the last searched choco package
View ci.ps1
function ci {
$lastCommand = Get-History -Count 1
$newCommand = $lastCommand.CommandLine.Replace('clist','cinst').Replace('choco list','choco install')
Invoke-Expression $newCommand
View wtf.ps1
function test {
$a = New-TemporaryFile
remove-item $a
View add-myphone.ps1
function Add-MyPhone {
[CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Low')]
param (
[Parameter(Mandatory = $true)]
[Parameter(Mandatory = $true)]
[ValidateSet('Cisco 6941', 'Cisco 7841', 'Cisco 7942')]
corbob /
Last active Aug 26, 2021
VSCode + PSReadline - How To Start Using the Alpha PowerShell Extension for PSReadline Goodness Now

VSCode + PSReadline - How To Start Using the Alpha PowerShell Extension for PSReadline Goodness Now

Courtesy of @scrthq from slack

Chatting on Twitter with @ctmcisco about this and figured it would be worth posting for everyone here, in case anyone else is curious!

  1. Go to the Branches tab on the vscode-powershell repo in GitHub:
  2. Find the 2.0.0 branch, then click the green check mark in the center of the page.
  3. Click the blue Details link next to the AppVeyor line. This will take you to the most recent AppVeyor build of that branch.
  4. On the top-right of the page, just above the console output, click the Artifacts tab.
View Check-Help.ps1
function Check-Help {
param (
$CommandExists = $false
Try {
Get-Command $Command -ErrorAction Stop
$CommandExists = $true
} catch [System.Management.Automation.CommandNotFoundException] {
View perhaps.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Recycle.ps1
[Parameter(Mandatory = $True,
ValueFromPipeline = $True,
ValueFromPipelineByPropertyName = $True)]
corbob / why.ps1
Created Mar 10, 2018
why? But Why...
View why.ps1
$licenses = Import-Csv $PSScriptRoot\LicenseCounts.csv
$licenses = $licenses[0] | select *available*,*delta*
if($licenses.'E3 Available' -ge 25) {
write-output "E3 greater than or equal to 25: $($licenses.'E3 Available')"
$E3AvailableStyle = 'good'
} elseif ($licenses.'E3 Available' -ge 10 -and $licenses.'E3 Available' -lt 25) {
$E3AvailableStyle = 'caution'
} else {