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
# Trying to call ListByNameFiltered from | |
# http://www.orthogonal.com.au/computers/simpledb/index.htm | |
# (input parameters) => expression | |
# (id) => { return id == 1234; } | |
[System.Reflection.Assembly]::LoadWithPartialName("System.Linq.Expressions") | |
if ( [string]::IsNullOrEmpty([psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")::get["Expression"]) ) | |
{ |
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
Add-Type -Path C:\WatiN\bin\net40\WatiN.Core.dll | |
if ( [string]::IsNullOrEmpty([psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")::get["Find"]) ) | |
{ | |
[psobject].Assembly.GetType("System.Management.Automation.TypeAccelerators")::add("Find", "WatiN.Core.Find") | |
} | |
Describing 'Bing Search' { | |
Given 'Search for "Automated Ops"' { |
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 | |
Short description | |
.DESCRIPTION | |
Long description | |
.EXAMPLE | |
Example of how to use this cmdlet | |
.EXAMPLE | |
Another example of how to use this cmdlet | |
#> |
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
root { | |
Get-Counter -ListSet * | Select-Object -ExpandProperty CounterSetName | foreach-object { | |
$content = $_; | |
script $content { | |
Get-Counter -ListSet $content | |
}.GetNewClosure(); | |
} | |
} |
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
function Register-HistoryInfoCustomType | |
{ | |
Update-TypeData -TypeName Microsoft.PowerShell.Commands.HistoryInfo ` | |
-MemberType ScriptProperty ` | |
-MemberName TotalExecutionTime ` | |
-value { $this.EndExecutionTime - $this.StartExecutionTime} ` | |
-Force | |
} |
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
Verifying that +cdhunt is my blockchain ID. https://onename.com/cdhunt |
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
# https://bitbucket.org/gfkeogh/simpledb/wiki/Home | |
Add-Type -Path C:\Scripts\Modules\SimpleDb\SimpleDb.Esent.dll | |
# Data Model | |
$episodeClass = @" | |
using System; | |
public class Episode | |
{ | |
public string Series { get; set; } | |
public int Id { get; set; } |
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
function New-Array {,$args} |
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
PS C:\> Start-PSNode -Server http://localhost:9092/ -AuthenticationType IntegratedWindowsAuthentication -Command { | |
Get-Process | Select-Object Handle, WorkingSet, Id, Name, UserProcessorTime | ConvertTo-Json | |
} |
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
PS C:\> Get-Web "http://localhost:9092" -AsJson |
OlderNewer