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
Import-Module -Name Emojis | |
function Invoke-EmojiSelection { | |
param([Microsoft.PowerShell.EditorServices.Extensions.EditorContext]$context) | |
$EmojiText = $context.CurrentFile.GetText($context.SelectedRange) | |
$Emoji = Get-Emoji -Name $EmojiText | |
if ($Emoji) | |
{ | |
$context.CurrentFile.InsertText($Emoji, $context.SelectedRange) |
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
Import-Module -Name Emojis | |
function Invoke-Emoji { | |
$context = $psEditor.GetEditorContext() | |
$EmojiText = $context.CurrentFile.GetTextLines($context.SelectedRange) | |
$Emoji = Get-Emoji -Name $EmojiText | |
if ($Emoji) | |
{ | |
$context.CurrentFile.InsertText($Emoji, $context.SelectedRange) |
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-CommandChoice | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[Array]$Array, | |
[Parameter(Mandatory=$true)] | |
[string]$caption, |
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 Invoke-TestCommand { | |
$Extensions = Get-Childitem -path "$Env:USERPROFILE\.vscode-insiders\extensions\gerane*" -Directory | |
$caption = "Please select a an Extension" | |
$message = "Package.json will be launched" | |
[int]$defaultChoice = 0 | |
$Choices = [System.Management.Automation.Host.ChoiceDescription[]] @($Extensions.Name) | |
$TestParam = $host.ui.PromptForChoice($caption,$message, $choices,$defaultChoice) | |
$ExtDir = $Extensions[$TestParam].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
function Test-ParameterSet | |
{ | |
[CmdletBinding(DefaultParameterSetName = 'Default')] | |
[OutputType([boolean], ParameterSetName = 'Test')] | |
[OutputType([PSObject], ParameterSetName = 'Default')] | |
param | |
( | |
[parameter(Mandatory = $true)] | |
[System.String]$Param1, |
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
$here = Split-Path -Parent $MyInvocation.MyCommand.Path | |
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace('.Tests.', '.') | |
. "$here\$sut" | |
Remove-EventLog -LogName Pester -ErrorAction SilentlyContinue | |
Describe 'Test-EventLogExists' { | |
Set-StrictMode -Version latest | |
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-RickRoll | |
{ | |
[CmdletBinding()] | |
param() | |
DynamicParam | |
{ | |
$ParameterName = 'Name' | |
$RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary |
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
## Please set the ROOT to the folder your nxlog was installed into, | |
## otherwise it will not start. | |
#define ROOT C:\Program Files\nxlog | |
define ROOT C:\Program Files (x86)\nxlog | |
define CERTDIR %ROOT%\cert | |
Moduledir %ROOT%\modules | |
CacheDir %ROOT%\data | |
Pidfile %ROOT%\data\nxlog.pid |