Skip to content

Instantly share code, notes, and snippets.

View danbarua's full-sized avatar

Dan Barua danbarua

  • GSK
  • United Kingdom
View GitHub Profile
@chrismatthieu
chrismatthieu / gist:964754
Created May 10, 2011 15:58
SIP Registrar with Tropo PSTN
// Run Redis - cd redis-2.2.4 and run src/redis-server
var sip = require('sip');
var sys = require('sys');
var redis = require('redis');
var tropoapi = require('tropo-webapi');
//Trim leading and trailing whitespace from string values.
function trim(str) {
return str.replace(/^\s+|\s+$/g, '');
@haf
haf / ESSagaRepo.cs
Created January 17, 2012 16:03
Spike MassTransit EventStore Saga Repo
// Copyright 2007-2011 Henrik Feldt
//
// 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
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@mythz
mythz / Test_Throughput.cs
Created October 12, 2012 21:45
Test Redis Throughput
using System;
using System.Diagnostics;
using NUnit.Framework;
using ServiceStack.Common;
using ServiceStack.Text;
namespace ServiceStack.Redis.Tests
{
[Explicit("Diagnostic only Integration Test")]
[TestFixture]
@trbngr
trbngr / EventStoreService.cs
Last active July 4, 2017 21:29
EventStore as a windows service w/ TopShelf
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
namespace EventStoreService
{
public class EventStoreService
{
@yetithefoot
yetithefoot / stuns
Last active April 2, 2024 10:49 — forked from zziuni/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
@dealproc
dealproc / DateTimeOffsetConvention.cs
Last active March 1, 2016 14:05
Uses DateTimeOffset to Timestamp with Timezone in Postgres from Npgsql
namespace Your.Namespace.Here {
using FluentNHibernate.Conventions;
using FluentNHibernate.Conventions.AcceptanceCriteria;
using FluentNHibernate.Conventions.Inspections;
using FluentNHibernate.Conventions.Instances;
using System;
class DateTimeOffsetConvention : IPropertyConvention, IPropertyConventionAcceptance {
public void Accept(IAcceptanceCriteria<IPropertyInspector> criteria) {
criteria.Expect(x => x.Type == typeof(DateTimeOffset));
@damianh
damianh / LibLogMSOwinLogging.cs
Last active August 1, 2017 16:23
Using LibLog with Microsoft.Owin.Logging
namespace LigLogOwin
{
using System;
using System.Diagnostics;
using LibLogOwin.Logging;
using Microsoft.Owin.Logging;
using Owin;
public class Startup
{
@seesharper
seesharper / Usage
Last active August 29, 2015 14:23
Migrate MsTest files top Xunit
scriptcs .\migrate.csx -- directoryContainingMsTestFiles