Skip to content

Instantly share code, notes, and snippets.

View prombouts's full-sized avatar
🏠
Working from home

Peter Rombouts prombouts

🏠
Working from home
View GitHub Profile
$name = 'put-your-logicapp-name-here'
$resourcegroup = 'put-resource-group-here'
$subscription = {this_is_your_subscription_guid}
armclient token $subscription |
Get-LogicAppTemplate `
-LogicApp $name `
-ResourceGroup $resourcegroup `
-SubscriptionId $subscription `
-Verbose | Out-File C:\Temp\$name.json
@prombouts
prombouts / Example.cs
Created October 22, 2017 19:00
Azure Function Example
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Host;
namespace SogetiBotFunctions
{
public static class Test
{
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"_artifactsLocation": {
"type": "string"
},
"_artifactsLocationSasToken": {
"type": "securestring"
},
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"configurationParameters": {
"value": {
"logicAppSkuName": "Standard",
"logicAppOneName": "LogicAppOne",
"logicAppTwoName": "LogicAppTwo"
}
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"logicAppName": {
"value": "LogicAppOne"
},
"NewLogicAppName": {
"value": "LogicAppTwo"
}
using System;
using System.Configuration;
using Microsoft.ProjectOxford.Text.Sentiment;
using System.Xml;
using System.ServiceModel.Syndication;
using System.Collections.Generic;
using System.Linq;
namespace TextAnalysis
{
public void DoWork()
{
var tmpfile = SaveImageCapture((BitmapSource)player.Source);
var emotions = await MakeRequest(tmpfile);
if (emotions == null ||
!emotions.Any())
{
txtNoFaces.Text = $"Detected faces: none";
return;