Skip to content

Instantly share code, notes, and snippets.

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

Ronnie Overby ronnieoverby

🏠
Working from home
  • Olo
  • Lexington, NC
View GitHub Profile
@ronnieoverby
ronnieoverby / Overby.Logger MultiThreading Unit Test
Created February 15, 2012 03:52
An interesting and bizarre unit test from my logging library
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using NUnit.Framework;
using Overby.Logger;
namespace Overby.Logging.Tests
{
[TestFixture]
public class MultiThreadingTests
@ronnieoverby
ronnieoverby / IDocumentStoreInitializer
Created March 8, 2012 14:09
idea for letting users control documentstore initialization in ravendb linqpad driver
using Raven.Client.Document;
namespace RavenLinqpadDriver
{
public interface IDocumentStoreInitializer
{
DocumentStore CreateAndInitialize();
}
}
@ronnieoverby
ronnieoverby / raven dynamic index
Created April 4, 2012 21:20
my attempt at ravendb dynamic index
public class DynamicIndex : AbstractMultiMapIndexCreationTask<DynamicIndex.ReduceResult>
{
public class ReduceResult
{
public string Value { get; set; }
public int Count { get; set; }
}
public DynamicIndex()
{
@ronnieoverby
ronnieoverby / gist:2311533
Created April 5, 2012 14:38
Handlebars Experiment
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Handlebars Test</title>
<style type="text/css">
body
{
font-family: Calibri;
using Raven.Client.Document;
namespace RavenLinqpadDriver
{
public interface IConfigureDocumentStore
{
/// <summary>
/// Completes configuration the DocumentStore.
/// </summary>
/// <param name="preConfiguredDocStore">A DocumentStore object that has been configured with the values from the connection properties dialog window.</param>
// raven linqpad driver query sample
var goats = Query<Goat>().Where(x=> x.Name = "Bernie");
goats.Dump("My Goats");
foreach(var g in goats)
g.Name = "Harold";
SaveChanges();
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Linq.Expressions;
using Fasterflect;
using Raven.Client;
using Raven.Client.Connection.Profiling;
using Raven.Client.Document;
using Raven.Client.Indexes;
public class Boobies : ICreateDocumentStore
{
public IDocumentStore CreateDocumentStore(ConnectionInfo ci)
{
// hard work here
}
}
public override IEnumerable<string> GetNamespacesToAdd()
{
var namespaces = new List<String>(base.GetNamespacesToAdd());
namespaces.AddRange(new[]
{
"Raven.Client",
"Raven.Client.Document",
"Raven.Abstractions.Data",
"Raven.Client.Linq"
select * from customers c
where c.DateJoined BETWEEN @a AND @b
union
select c.* from customers c
join invites i on i.CustomerId = c.Id