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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
using Microsoft.AspNet.SignalR; | |
using Microsoft.AspNet.SignalR.Client; | |
using System.Collections.Concurrent; | |
using System.Net; |
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
$eventName = "receiveMessage"; | |
Add-Type -Path ".\SignalRClient.dll" | |
$s = New-Object SignalRClient.Connection("http://localhost/", "commandhub"); | |
$s.Start($eventName); | |
while($true) { | |
$s.TryDequeue($eventName) | |
Start-Sleep -seconds 1 | |
} | |
# string TryDequeue(string eventName) |
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 searchData(svcUrl, data, searchTerm) { | |
var context = new LightSwitchApplication.ApplicationData({ | |
name: 'oData', | |
oDataServiceHost: svcUrl | |
}); | |
return context | |
.EntitySet | |
.filter(function (entity) { | |
return entity.Name.startsWith(this.q); |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Diagnostics; | |
using RabbitMQ.Client; | |
using RabbitMQ.Client.Events; | |
using RabbitMQ.Util; | |
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
// global - or wherever it suits you | |
var ctxApplicationData = "ctxApplicationData"; | |
// somewhere at the very start of the application | |
$(function () { | |
var svcApplicationData = msls.application.rootUri + "/ApplicationData.svc"; | |
$data.initService(svcApplicationData) | |
.then(function (context) { | |
// manage your data through context with JSLQ | |
console.log(svcApplicationData + ": we are here..."); |
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
// http://d-fens.ch/2013/11/27/biz-dfch-ps-storebox-api-invoke-cterafiletransfer/ | |
// Check https://github.com/dfch/biz.dfch.PS.Storebox.Api for the complete repository of this module | |
function Invoke-CteraFileTransfer { | |
[CmdletBinding( | |
SupportsShouldProcess=$true, | |
ConfirmImpact="High", | |
HelpURI='http://dfch.biz/PS/Storebox/Api/Invoke-CteraFileTransfer' | |
)] | |
[OutputType([string])] | |
Param ( |
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
# [biz.dfch.PS.System.Data] Invoke-SqlCmd without the overhead | |
# http://d-fens.ch/2013/11/26/biz-dfch-ps-system-data-invoke-sqlcmd-without-the-overhead | |
function Invoke-SqlCmd { | |
[CmdletBinding( | |
SupportsShouldProcess=$true, | |
ConfirmImpact="Medium", | |
HelpURI='http://dfch.biz/PS/System/Data/Invoke-SqlCmd/' | |
)] | |
Param ( |
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
# http://d-fens.ch/2013/12/05/vcac-dynamically-execute-scripts-in-externalwfstubs-workflows-with-powershell/ | |
PS > $Machine.GetType().FullName | |
DynamicOps.ManagementModel.VirtualMachine | |
PS > $m.GetType().FullName | |
DynamicOps.ManagementModel.ManagementModelEntities | |
# script main | |
$Write-Host ("{0}: Processing Machine entity: '{1}'." -f $Machine.VirtualMachineID, $Machine.VirtualMachineName); |
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
# http://d-fens.ch/2013/12/05/vcac-dynamically-execute-scripts-in-externalwfstubs-workflows-with-powershell/ | |
# Machine is the currently processed virtual machine | |
# Path is a default path where the scripts are located | |
# ScriptName is the name of the PowerShell script passed from the custom properties | |
# htScriptParam is a hastable containing parameter name and raw expression | |
$ScriptName = Join-Path -Path $Path -ChildPath $ScriptName; | |
if( !(Test-Path -Path $ScriptName) ) { | |
Write-Error ("ScriptName '{0}' does not exist." -f $ScriptName); |
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
# http://d-fens.ch/2013/12/05/vcac-dynamically-execute-scripts-in-externalwfstubs-workflows-with-powershell/ | |
PARAM ( | |
[ValidateSet('EXAMPLE', 'SHAREDOP')] | |
[Parameter(Mandatory = $true, Position = 0)] | |
[string] $Domain | |
, | |
[Parameter(Mandatory = $true, Position = 1)] | |
[string] $Username | |
, |
OlderNewer