d-fens GmbH General-Guisan-Strasse 6 CH-6300 Zug Switzerland
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
// HttpClient and how to use Headers, Content-Type and PostAsync | |
// http://d-fens.ch/2014/04/12/httpclient-and-how-to-use-headers-content-type-and-postasync/ | |
// Copyright 2014-2015 Ronald Rink, d-fens GmbH | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// http://www.apache.org/licenses/LICENSE-2.0 |
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/2014/01/07/nobrainer-powershell-currency-converter/ | |
Param ( | |
[Parameter(Mandatory = $true, Position = 0)] | |
[string] $From | |
, | |
[Parameter(Mandatory = $true, Position = 1)] | |
[string] $To | |
, | |
[Parameter(Mandatory = $false, Position = 2)] |
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 | |
, |
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/ | |
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
# [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/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
// 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
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; | |