Skip to content

Instantly share code, notes, and snippets.

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

Clemens Vasters clemensv

🏠
Working from home
View GitHub Profile
@clemensv
clemensv / gist:4253067
Created December 10, 2012 20:21
ForwardTo with Topics and Session Queues
namespace ConsoleApplication2
{
using System;
using System.Configuration;
using Microsoft.ServiceBus;
using Microsoft.ServiceBus.Messaging;
class Program
{
static void Main(string[] args)
@clemensv
clemensv / gist:4252776
Created December 10, 2012 19:33
ForwardTo Minimal Sample
namespace ConsoleApplication2
{
using System;
using System.Configuration;
using Microsoft.ServiceBus;
using Microsoft.ServiceBus.Messaging;
class Program
{
static void Main(string[] args)
namespace Samples
{
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
delegate T InstanceFactoryCallback<out T>();
@clemensv
clemensv / gist:4655204
Last active December 11, 2015 20:28
Service Bus Notification Hubs with Windows 8 and Templates. Toasts and Live Tile. Either or both. With peek and pictures. One input message.
async Task InitNotificationsAsync()
{
await notificationHub.RefreshRegistrationsAsync();
if (!await notificationHub.RegistrationExistsForApplicationAsync("myUrgentToast"))
{
await notificationHub.CreateTemplateRegistrationForApplicationAsync(
CreateToastTemplate(), "myUrgentToast", new string[]{"urgent", "alert"});
}
@clemensv
clemensv / gist:4967845
Created February 16, 2013 17:37
Versatile way to wrap, mock and partially override message senders in SB
using Microsoft.ServiceBus.Messaging;
using System;
using System.Collections.Generic;
namespace MockMessageSender
{
public class MutableMessageSender
{
public delegate void _Send(BrokeredMessage message);
@clemensv
clemensv / gist:6367476
Created August 28, 2013 15:38
Tiny web service switching an LED made based on https://github.com/sirleech/Webduino
/* Tiny web service switching an LED made based on https://github.com/sirleech/Webduino */
#include "SPI.h"
#include "Ethernet.h"
#include "WebServer.h"
#define DEBUG
static uint8_t mac[6] = { 0x90, 0xA2, 0xDA, 0x0D, 0xBC, 0xAE };
static uint8_t ip[4] = { 192, 168, 2, 107 };
“What was the deal with the Halloween Documents?”
* I can also sell you a very fine 1998 Ford F-150. My team is committing to Apache
Qpid Proton. Maybe go talk to the NodeJS folks.
“So, when is the last time you hacked on a project in Visual Studio?”
* Yesterday. I'm writing this at breakfast.
“Do you have code on GitHub?” (GitHub, not CodePlex)
@clemensv
clemensv / azureobd
Created December 12, 2013 13:50
azureobd startup script to be placed into init.d replace {KEY}, {NAMESPACE}, and {QUEUE}
#! /bin/bash
### BEGIN INIT INFO
# Provides: azureobd
# Required-Start: $remote_fs $syslog $network $all
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start AzureOBD at boot time
# Description: Start AzureOBD at boot time.
### END INIT INFO
{
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"servicebusNamespaceName": {
"type": "string",
"metadata": {
"description": "Name of the Event Hub namespace"
}
},

Azure Relay Hybrid Connections Protocol

Azure Relay is one of the key capability pillars of the Azure Service Bus platform. The Relay’s new "Hybrid Connections" capability is a secure, open-protocol evolution based on HTTP and WebSockets. It supersedes the former, equally named "BizTalk Services" feature that was built on a proprietary protocol foundation. The integration of Hybrid Connections into Azure App Services will continue to function as-is.

"Hybrid Connections" allows establishing bi-directional, binary stream