Skip to content

Instantly share code, notes, and snippets.

View jsiegmund's full-sized avatar

Jasper Siegmund jsiegmund

View GitHub Profile
public class HourBookingDialog : AuthenticatedDialog
{
private readonly string _propNameModel = "HourBookingModel";
private readonly string _propNameCustomers = "Customers";
private readonly string _propNameProjects = "Projects";
public HourBookingDialog(IConfiguration configuration) : base (nameof(HourBookingDialog), configuration["ConnectionName"])
{
var waterFallSteps = new WaterfallStep[]
{
#Libraries
import sys
import RPi.GPIO as GPIO # Importeer de GPIO bibliotheek.
from time import sleep ## Importeer de bibliotheek voor tijdfuncties
seconds = 5
# Set the number of seconds to the provided argument
if len(sys.argv) > 2:
seconds = sys.argv[2]
@jsiegmund
jsiegmund / gist:b64c128062eb46d0e6b39a41bc500052
Last active July 26, 2018 09:44
Remove-LoadBalancerDebuggerNatPools
function Remove-LoadBalancerDebuggerNatPools
{
param(
[string]$ResourceGroupName,
[string]$LoadBalancerName
)
Write-Information "Removing NAT pools with 'debugger' in the name from load balancer $LoadBalancerName"
$loadBalancer = Get-AzureRmLoadBalancer -Name $LoadBalancerName -ResourceGroupName $resourceGroupName
$pools = $loadBalancer.InboundNatPools | Where-Object { $_.Name -match "debugger" }
@jsiegmund
jsiegmund / gist:f904f29e32f7f262b291a1bd961a4d86
Created July 26, 2018 09:44
Remove-VMScaleSetDebuggerNatPools
function Remove-VMScaleSetDebuggerNatPools {
param (
[string]$ResourceGroupName,
[string]$VMScaleSetName
)
Write-Information "Removing NAT pools with 'debugger' in the name from VM scale set $VMScaleSetName"
$vmScaleSet = Get-AzureRmVmss -ResourceGroupName $ResourceGroupName -VMScaleSetName $VMScaleSetName
$natPools = $vmScaleSet.VirtualMachineProfile.NetworkProfile.NetworkInterfaceConfigurations.ipConfigurations.LoadBalancerInboundNatPools
$debugPools = $natPools | Where-Object { $_.Id -match "Debugger" }
@jsiegmund
jsiegmund / SPNCreation.ps1
Created January 27, 2017 09:27
Creates a Service Principal in Azure
param
(
[Parameter(Mandatory=$true, HelpMessage="Enter Azure Subscription id. You need to be Subscription Admin to execute the script")]
[string] $subscriptionId,
[Parameter(Mandatory=$true, HelpMessage="Provide a password for SPN application that you would create")]
[securestring] $passwordparam,
[Parameter(Mandatory=$false, HelpMessage="Provide a SPN role definition")]
[string] $spnRole = "owner"
Verifying that "jsiegmund.id" is my Blockstack ID. https://onename.com/jsiegmund
#r "D:\Program Files (x86)\SiteExtensions\Functions\0.3.10261\bin\Microsoft.Azure.WebJobs.Extensions.NotificationHubs.dll"
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Microsoft.Azure.NotificationHubs;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions;
public static void Run(string inputEventMessage, string inputBlob, IBinder binder, out string outputBlob, TraceWriter log)