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 ConvertTo-OTBStyle { | |
#Requires -Modules @{ModuleName='PSScriptAnalyzer';ModuleVersion='1.15.0'} | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory, ParameterSetName = 'Directory')] | |
[ValidateScript( {Test-Path -Path $_ -PathType Container})] | |
[IO.DirectoryInfo]$Directory, | |
[Parameter(ParameterSetName = 'Directory')] | |
[Switch]$Recurse, |
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 Update-LocalTFSFolder { | |
[CmdletBinding()] | |
param( | |
[ValidateScript({Test-Path $_ -Include "tf.exe" -Type Leaf})] | |
$TF = "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TF.exe", | |
[Parameter(ValueFromPipeline,Mandatory,ParameterSetName='Path')] | |
[String]$Path, | |
[Parameter(ValueFromPipelineByPropertyName,Mandatory,ParameterSetName='FullName')] |
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
#CommentFlag // | |
#InstallKeybdHook | |
// Author: Jarvis Prestidge | |
// Description: Simulates my preferred keyboard layout, similiar to that of the Pok3r 60% keyboard | |
// on any keyboard without programmable keys. i.e. my laptop ^^ | |
// <COMPILER: v1.1.22.00> | |
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 Download-Module { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory,ValueFromPipelineByPropertyName)] | |
[String[]]$Name, | |
[Parameter(ValueFromPipelineByPropertyName)] | |
[String]$Repository, | |
[PSCredential]$Credential, |
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
min = 1 | |
loop { | |
sleep, % min*60*1000 | |
mousemove, 10, 0, 20, R | |
sleep, % 1000 | |
mousemove, -10, 0, 20, R | |
sleep, % 1000 | |
mousemove, 10, 0, 20, R | |
sleep, % 1000 |
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
Update-TypeData -TypeName String -MemberType ScriptMethod -MemberName ToTitle -Force -Value { | |
(Get-Culture).TextInfo.ToTitleCase($this) | |
} |
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-ScriptRequirements { | |
<# | |
.SYNOPSIS | |
Gets all calls within a script or scriptblock and outputs name, module and count. | |
.DESCRIPTION | |
Uses AST to retrieve all calls in a valid script file, command, or | |
scriptblock, then outputs the amount of each along with the module | |
.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
### Keybase proof | |
I hereby claim: | |
* I am jpruskin on github. | |
* I am jpruskin (https://keybase.io/jpruskin) on keybase. | |
* I have a public key ASBSOojCinFMzkuH-Gj20s5k77xK5v7w6HRSLi8EaCblcgo | |
To claim this, I am signing this object: |
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
param( | |
$LessThan = 5, | |
$ForMinutes = 5 | |
) | |
$Continuing = $true | |
$NetBytes = '\Network Interface(*)\Bytes Received/sec' | |
$Count = 0 | |
while ($Continuing) { |
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 Start-AzureLab { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory, ValueFromPipelineByPropertyName, ValueFromPipeline)] | |
[ArgumentCompleter({(Get-AzureRmResourceGroup).ResourceGroupName})] | |
[string[]]$ResourceGroupName, | |
[ArgumentCompleter({(Get-AzureRmSubscription).Name | % {"'$_'"}})] | |
[string]$SubscriptionName = (Get-AzureRmContext).Subscription.Name, |