$/
docs/
src/
tests/
samples/
artifacts/
packages/
build/
lib/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BaseModule : NancyModule | |
{ | |
protected readonly int Version; | |
protected BaseModule(string moduleName, int? version) | |
: base((version == null ? "/" : "/v" + version) + "/" + moduleName) | |
{ | |
Version = !version.HasValue ? 1 : version.Value; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DocumentDbStore : IStorage | |
{ | |
private string endpoint = "rootUri"; | |
private string authKey = "key"; | |
private readonly DocumentClient _client; | |
private readonly DocumentCollection _col; | |
public DocumentDbStore() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.google.com/a/davidwhitney.co.uk/presentation/d/1eDD5cyT-oXwqzuutZlnBQoSBFNbCdzxJ0bXw-_DG3sU/edit?usp=docslist_api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.google.com/a/just-eat.com/presentation/d/1NcjmoZlXo617B1ziIPpVsAXUwlEZ6AOhHUd7kosSdpU/pub?start=false&loop=false&delayms=3000#slide=id.p |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SomeType | |
{ | |
public string Name { get; set; } | |
} | |
const string body = "(MyThing.Name == \"Awesome\")"; | |
var p = Expression.Parameter(typeof (SomeType), "MyThing"); | |
var e = DynamicExpression.ParseLambda(new[] {p}, null, body); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using NUnit.Framework; | |
namespace dayofweekkata | |
{ | |
public class PrettyPrinter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Linq; | |
using System.Linq.Expressions; | |
namespace ExpressionSorting | |
{ | |
/// <summary> | |
/// This is a little too clever, it looks like voodoo, but it makes the higher level API totally beautiful. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The MP3 file format, didn't provide any means for including metadata about the song. ID3 tags were invented to solve this problem. | |
You can tell if an MP3 file includes ID3 tags by examining the last 128 bytes of the file. If they begin with the characters TAG, you have found an ID3 tag. The format of the tag is as follows: | |
TAG song artist album year comment genre | |
The spec is here: http://id3.org/ID3v1 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Engine<T> where T: IEngineComponent | |
{ | |
private readonly T _component; | |
protected bool ContinueLooping; | |
private Thread _thread; | |
public Engine(T component) | |
{ | |
_component = component; | |
} |