This file contains 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
[CmdletBinding(DefaultParameterSetName = 'FixedG')] | |
param( | |
[Parameter(ParameterSetName = 'FixedR', Mandatory)] | |
[ValidateRange(0, 255)] | |
$fixedR, | |
[Parameter(ParameterSetName = 'FixedG')] | |
[ValidateRange(0, 255)] | |
[int]$fixedG = 105, |
This file contains 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
using namespace System.Text.RegularExpressions | |
param([string[]]$extensions = 'ps1') | |
function Get-FileEncoding | |
{ | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory = $True, ValueFromPipelineByPropertyName = $True)] [string]$Path | |
) |
This file contains 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
using System; | |
using System.Runtime.InteropServices; | |
using System.Reflection; | |
namespace App | |
{ | |
enum E1 : byte | |
{ | |
e1 = 5 | |
} |
This file contains 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
<Configuration> | |
<ViewDefinitions> | |
<View> | |
<Name>Measure-Object-Output</Name> | |
<ViewSelectedBy> | |
<TypeName>Microsoft.PowerShell.Commands.GenericMeasureInfo</TypeName> | |
</ViewSelectedBy> | |
<ListControl> | |
<ListEntries> | |
<ListEntry> |
This file contains 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( | |
$etlFile = '.\perfviewdata.etl', | |
$scenario = 'echo 1', | |
$logFile = '.\perfview.log') | |
$perfViewArgs = @( | |
'/AcceptEula' | |
'/ThreadTime' | |
"/LogFile=$logFile" | |
"/DataFile:$etlFile" |
This file contains 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
enum Color { Red; Green; Blue } | |
[System.Diagnostics.Tracing.EventSource(Name = "MyPSEventSource")] | |
class C : System.Diagnostics.Tracing.EventSource | |
{ | |
[System.Diagnostics.Tracing.Event(1)] | |
[void] SomeRandomEvent([string]$Message, [Color]$Color) | |
{ | |
$this.WriteEvent([int]1, [string]$Message, [int]$Color) |
This file contains 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
#r "./FSharp.Data.2.4.3/lib/net45/FSharp.Data.dll" | |
open FSharp.Data | |
let (user,repo) = | |
match fsi.CommandLineArgs with | |
| [| _; arg1; arg2 |] -> (arg1, arg2) | |
| _ -> failwithf "usage: gh user repo" |
This file contains 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 | |
# Print a tree given a key property and parent property | |
# | |
# .PARAMETER InputObject | |
# | |
# The object to print. | |
# | |
# .PARAMETER KeyProperty |
This file contains 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( | |
[Parameter(ValueFromPipelineByPropertyName = $true, Mandatory, Position = 0)] | |
[Alias("PSPath")] | |
[string]$Path, | |
[string]$OutputPath | |
) | |
process |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="Configuration"> | |
<xs:complexType> | |
<xs:all> | |
<xs:element name="DefaultSettings" type="DefaultSettings" minOccurs="0" maxOccurs="1"/> | |
<xs:element name="SelectionSets" type="SelectionSets" minOccurs="0" maxOccurs="1"/> | |
<xs:element name="Controls" type="Controls" minOccurs="0" maxOccurs="1"/> | |
<xs:element name="ViewDefinitions" type="ViewDefinitions" minOccurs="0" maxOccurs="1"/> |
OlderNewer