This file contains 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 interface IRavenUniqueInserter | |
{ | |
void StoreUnique<T, TUnique>( | |
IDocumentSession session, T entity, | |
Expression<Func<T, TUnique>> keyProperty); | |
} | |
public class RavenUniqueInserter : IRavenUniqueInserter | |
{ | |
public void StoreUnique<T, TUnique>(IDocumentSession session, T entity, |
This file contains 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 BooksApiController : FooApiController | |
{ | |
public IEnumerable<Book> Get() | |
{ | |
return DocumentSession | |
.Query<Book>() | |
.OrderByAscending(p => p.Author) | |
.Take(100); | |
} | |
} |
This file contains 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
... | |
var config = GlobalConfiguration.Configuration; | |
// Replace the default JsonFormatter with our custom one | |
var index = config.Formatters.IndexOf(config.Formatters.JsonFormatter); | |
config.Formatters[index] = new JsonCamelCaseFormatter(); | |
... |
This file contains 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.Configuration; | |
using System.Web; | |
using System.Web.Http; | |
using System.Web.Http.Controllers; | |
namespace Miscellaneous.Attributes.Controller | |
{ | |
/// <summary> | |
/// Filter by IP address (ASP.NET Web API version) |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- Mocha 1.0.2 at time of writing --> | |
<script type="text/javascript" src="https://raw.github.com/visionmedia/mocha/master/mocha.js"></script> | |
<link rel="stylesheet" type="text/css" href="https://raw.github.com/visionmedia/mocha/master/mocha.css" /> | |
</head> | |
<script lang="text/javascript"> | |
mocha.setup({ | |
ui: "bdd", |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Console Reporter Spec</title> | |
<link rel="stylesheet" href="../ext/jasmine.css" type="text/css" /> | |
<script type="text/javascript" src="../ext/jasmine.js"></script> | |
<script type="text/javascript" src="../ext/jasmine-html.js"></script> |
This file contains 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.ComponentModel; | |
using System.Diagnostics; | |
using System.IO; | |
using System.Linq; | |
using CsvHelper.Configuration; | |
using Xunit; | |
namespace CsvHelper.Tests | |
{ |
This file contains 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.Data; | |
using System.Data.Common; | |
using System.Data.SqlTypes; | |
using System.Runtime.CompilerServices; | |
using Oracle.DataAccess.Client; | |
namespace Foo | |
{ | |
/// <summary> |
This file contains 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
module Jekyll | |
class LessCssFile < StaticFile | |
def write(dest) | |
# do nothing | |
end | |
end | |
# Expects a lessc: key in your _config.yml file with the path to a local less.js/bin/lessc | |
# Less.js will require node.js to be installed |