Skip to content

Instantly share code, notes, and snippets.

View peschkaj's full-sized avatar

Jeremiah Peschka peschkaj

View GitHub Profile
We couldn’t find that file to show.
tags.each { |tag| tag_list << Tag.first_or_create(:name => tag.strip) }
@peschkaj
peschkaj / method one.cs
Created February 26, 2012 17:25
Potential CorrugatedIron conflict resolution mechanism
public delegate T ResolveConflict<out T>(RiakObject theObject);
public T GetObject<T>(DeserializeObject<T> deserializeObject, ResolveConflict<T> resolveConflict = null)
{
if (deserializeObject == null)
{
throw new ArgumentException("deserializeObject must not be null");
}
if (Siblings.Count > 1 && resolveConflict != null)
@peschkaj
peschkaj / gist:2200634
Created March 25, 2012 22:52
MapReduce Index and GetObjects<T>
using System;
using System.Linq;
using System.Threading;
using System.Web;
using CorrugatedIron;
using CorrugatedIron.Comms;
using CorrugatedIron.Config;
using CorrugatedIron.Models;
using CorrugatedIron.Models.MapReduce;
using CorrugatedIron.Models.MapReduce.Inputs;
@peschkaj
peschkaj / hack.sh
Created March 31, 2012 17:17 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
DECLARE @rVal AS BIT ;
DECLARE @dbName AS sysname ;
DECLARE @command AS NVARCHAR(MAX)
DECLARE @error AS NVARCHAR(MAX) ;
DECLARE @newline AS NVARCHAR(2) ;
SET @error = N'' ;
SET @newline = NCHAR(13) + NCHAR(10) ;
DECLARE shrinklog CURSOR FAST_FORWARD READ_ONLY
@peschkaj
peschkaj / xbuild.out
Created November 18, 2012 14:57
CorrugatedIron xbuild output
XBuild Engine Version 2.10.9.0
Mono, Version 2.10.9.0
Copyright (C) Marek Sieradzki 2005-2008, Novell 2008-2011.
Build started 11/18/2012 6:49:19 AM.
__________________________________________________
Project "/Users/jeremiah/Projects/CorrugatedIron/CorrugatedIron.sln" (default target(s)):
Target ValidateSolutionConfiguration:
Building solution configuration "Debug|Any CPU".
Target Build:
using System;
using CorrugatedIron;
using CorrugatedIron.Models;
using CorrugatedIron.Models.Search;
using CorrugatedIron.Models.MapReduce;
using CorrugatedIron.Util;
namespace MiscellaneousSamples
{
public class RiakSearch
using System;
using System.Linq;
using CorrugatedIron;
using CorrugatedIron.Models;
using CorrugatedIron.Models.MapReduce;
using CorrugatedIron.Models.MapReduce.Inputs;
using CorrugatedIron.Util;
namespace MiscellaneousSamples
{
namespace CorrugatedIron.Models.MapReduce.Inputs
{
public static class RiakIndex
{
private static string RiakKeysIndex = "$key";
public static RiakIndexInput AllKeys(string bucket)
{
string first = "\u0000";
string last = char.ConvertFromUtf32(0x10FFFF);