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-Csx { | |
| param($script = 'System.Console.WriteLine("Hello World");') | |
| foreach($dll in (dir .\lib)) { Add-Type -Path $dll.FullName} | |
| $engine = New-Object Roslyn.Scripting.CSharp.ScriptEngine $null, $null | |
| $engine.AddReference("System") | |
| $engine.AddReference("System.Core") | |
| $session = $engine.CreateSession() |
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
| var mongoose = require('mongoose'); | |
| var Q = require('q'); | |
| mongoose.Promise.prototype.then = function(fulfilled, rejected) { | |
| var deferred = Q.defer(); | |
| this.addCallback(deferred.resolve); | |
| this.addErrback(deferred.reject); | |
| return deferred.promise.then(fulfilled, rejected); |
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([string] $CountProperty = 'Count', | |
| [string] $NameProperty = 'Name', | |
| [double] $Width = 400, | |
| [double] $Height = 300, | |
| [string] $WindowTitle = 'Pie Graph', | |
| [string] $ChartTitle = $null, | |
| [Parameter(ValueFromPipeline = $true)] $Items, | |
| [switch] $Show = $false) | |
| begin { | |
| Import-Module wpk |