Skip to content

Instantly share code, notes, and snippets.

View zdam's full-sized avatar

Adam Webber zdam

  • Brisbane, Australia
View GitHub Profile
@zdam
zdam / CoreDataMatchDate
Created April 3, 2011 23:37
Core Data fetch by Date
+(NSPredicate *)dateMatcher:(NSDate *)date forAttribute:(NSString *)attributeName{
//First set the unit flags you want automatically put into your date from an NSDate object
unsigned startUnitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit;
//now create an NSCalendar object
@zdam
zdam / clojure-clr-webserver.cs
Created February 28, 2010 00:00
Use clojureCLR inside an asp.net MVC app
/*
* This is a litle tech demo to demonstrate using clojureCLR in a CLR web app.
*
* A custom IHttpHandler (ClojureHttpHandler) handles invocation of clojure code,
* and a custom IRouteHandler (ClojureRouteHandler) routes requests to the HttpHandler.
*
* See comments in the code for further detail.
*
* Cheers, zdam
* http://zimpler.com/blog/clojureclr-in-an-asp-net-mvc-app