Skip to content

Instantly share code, notes, and snippets.

Alexander Zeitler AlexZeitler

Block or report user

Report or block AlexZeitler

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
makomweb / csharp_implicit_type_conversion.cs
Last active Aug 29, 2015
C# implicit type conversion (see for a more detailed explanation)
View csharp_implicit_type_conversion.cs
public class ImplicitConversionTest
public class A
public string Member { get; set; }
public static implicit operator string(A self)
return self.Member;
mattdot / gist:1086078
Created Jul 16, 2011
WCF Web API: Extension methods for requesting a response in JSON, and for setting Basic auth headers
View gist:1086078
public static class HttpClientExtensionMethods
public static void SetBasicAuth(this HttpClient httpClient, string userName, string password)
var byteArray = Encoding.ASCII.GetBytes(userName + ":" + password);
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
public static void AcceptJson(this HttpClient httpClient)
pmhsfelix / gist:1140101
Created Aug 11, 2011
Operation URI resolution
View gist:1140101
class TheResolverTestService
public void Oper1(string prm1, int prm2)
[WebGet(UriTemplate = "op2/{prm1}/middle/{prm2}")]
darkiri / gist:2039990
Created Mar 14, 2012
is there a method which returns all .net base types/structs that System.Convert is able to convert to/from?
View gist:2039990
typeof (Convert)
benfoster / gist:3655639
Created Sep 6, 2012
Consuming my ASP.NET Web API client
View gist:3655639
static void Main(string[] args)
var configuration = ClientConfiguration.Initialize(configure =>
var pages = configuration.GetPagesClient();
aliostad / azure-vm-bootstrapper.ps1
Last active Apr 18, 2016
Azure VM bootstrapper
View azure-vm-bootstrapper.ps1
# Usage:
# iex ((new-object net.webclient).DownloadString(''))
# Bootstraps the Azure VM by modyifying settings and installing below:
# 1. Turn off annoying Intrenet Explorer enhanced security
# 2. Install chocolatey
# 3. Install PerfView
# 4. Install DebugView
# 5. Install SuperBenchmarker
# 6. Install notepad++
# 7. Install windbg
kagemusha / gist:5866759
Created Jun 26, 2013
Using Debugger with Grunt
View gist:5866759
version: grunt-cli v0.1.8
1. Install node-inspector globally (-g)
npm install -g node-inspector
2. Add debugger statements to your code
3. Run your grunt task in debug mode
View gist:af556571a733fc5c20be01ea9ae487dc
Scenario: different business teams building parts of a product, splitted by business domains. We are anly communicate via domain events published to a message bus and sometimes via published links.
As the domain events are the "contracts" between the business domains we want to declare and enforce the schemas of the events.
Our solution is built in node but the concept could work in any stack.
View gist:3782072
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Raven.Client.Document;
namespace OurNamespace
public sealed class RavenStore :IDisposable
kevinswiber / siren_api.yml
Last active Sep 20, 2019
Siren definitions for Open API Specification
View siren_api.yml
swagger: '2.0'
title: Siren API
description: Template for a Siren API
version: '0.1.0'
- http
- https
basePath: /
You can’t perform that action at this time.