Skip to content

Instantly share code, notes, and snippets.

View robb's full-sized avatar

Robb Böhnke robb

View GitHub Profile
Running 136 tests:
........................................................................................................................................
# ----- XCode (OCUnit) Test Output --------------------
Test Case '-[AsyncSpecTest testAsyncSpec]' started.
Test Case '-[AsyncSpecTest testAsyncSpec]' passed (0.036 seconds).
Test Case '-[AsyncSpecTest2 testBeforeAllAndAfterAllHooks]' started.
Test Case '-[AsyncSpecTest2 testBeforeAllAndAfterAllHooks]' passed (0.000 seconds).

Mantle

Mantle makes it easy to write a simple model layer for your Cocoa or Cocoa Touch application.

Getting Started

To start building the framework, clone this repository and then run script/bootstrap. This will automatically pull down any dependencies.

// MTLManagedObjectAdapter.m
- (NSPredicate *)uniquingPredicateForModel:(MTLModel<MTLManagedObjectSerializing> *)model {
NSSet *propertyKeys = nil;
if ([self.modelClass respondsToSelector:@selector(propertyKeysForManagedObjectUniquing)]) {
propertyKeys = [self.modelClass propertyKeysForManagedObjectUniquing];
}
NSPredicate *predicate = nil;
for (NSString *propertyKey in propertyKeys) {
Pod::Spec.new do |s|
s.name = "ReactiveCocoa"
s.version = "2.0.0rc3"
s.summary = "A framework for composing and transforming sequences of values."
s.homepage = "https://github.com/blog/1107-reactivecocoa-is-now-open-source"
s.author = { "Josh Abernathy" => "josh@github.com" }
s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveCocoa.git", :tag => 'v2.0-RC3' }
s.license = 'Simplified BSD License'
s.description = "ReactiveCocoa offers:\n" \
"1. The ability to compose operations on future data.\n" \
//
// Example.m
// Partial
//
// Created by Robert Böhnke on 5/23/13.
// Copyright (c) 2013 Robert Böhnke. All rights reserved.
//
#import "Partial.h"
@robb
robb / gist:5524258
Created May 6, 2013 09:49
Convenience macro for creating singletons and the like. Handy if you define a lot of fixture objects.
#define SHARED_INSTANCE(EXPR) \
^(){ \
static typeof((EXPR)) instance; \
static dispatch_once_t onceToken; \
dispatch_once(&onceToken, ^{ \
instance = EXPR;\
});\
return instance;\
}()
@robb
robb / gist:4431330
Created January 2, 2013 00:43
OpenCL vectors with Clang
typedef float float3 __attribute__((ext_vector_type(3)));
- (void)test;
{
float3 a = {1, 2, 3};
a = 2.0f * a;
NSLog(@"%f %f %f", a.x, a.y, a.z);
}
@robb
robb / gist:2968975
Created June 21, 2012 22:22
macros and literals fail
STAssertEqualObjects(@[],
@[],
@"Works");
STAssertEqualObjects(@[@1],
@[@1],
@"Works");
STAssertEqualObjects(@[@1, @2, @3],
@[@1, @2, @3],
@robb
robb / numbers.md
Created April 23, 2012 16:46
Japanese Numbers Vocabulary

一 (one)

一  (いち) one
一つ (ひとつ) one thing
一時 (いちじ) one o'clock
一分 (いっぷん) one minute
一月 (いちがつ) January
一日 (いちにち) one day
一日 (ついたち) the 1st day of the month
一人 (ひとり) one person

@robb
robb / robbs-hacks.md
Created April 18, 2012 14:32
Music Hack Day Hacks

Music Hack Day Hacks I worked on

  • [Spinamp]
    Music Hack Day San Francisco – Feb 11, 2012
  • [Notorious Siri]
    Music Hack Day London – Dec 3, 2011
  • [6 Strings]
    Music Hack Day Montreal – Sep 24, 2011
  • SoundNebula
    Music Hack Day Berlin – May 28