Skip to content

Instantly share code, notes, and snippets.

View bismark's full-sized avatar
🆗

Ryan Johnson bismark

🆗
View GitHub Profile
@bismark
bismark / input.ex
Last active January 30, 2018 18:29
Interesting `mix format` output in elixir 1.6.0
# No Defaults
defmodule Test11 do
defstruct [:foo1, :foo2, :foo3, :foo4, :foo5, :foo6, :foo7, :foo8, :foo9, :foo10, :foo11, :foo12, :foo13, :foo14]
end
defmodule Test12 do
defstruct([:foo1, :foo2, :foo3, :foo4, :foo5, :foo6, :foo7, :foo8, :foo9, :foo10, :foo11, :foo12, :foo13, :foo14])
end
# Mixed defaults

Keybase proof

I hereby claim:

  • I am bismark on github.
  • I am bismark (https://keybase.io/bismark) on keybase.
  • I have a public key ASDDOi6NpBTJoCDPyiloq2VVzgTIGPMfXKuh6DgtjO3-nAo

To claim this, I am signing this object:

@bismark
bismark / gist:8064335
Last active January 1, 2016 00:08
core data crash occurs on line 26: 2013-12-20 17:38:48.435 CoreDataCrash[23059:70b] *** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0xcf61c00 <x-coredata://E61319FE-C903-4281-A90D-A0C46FE7F816/Widget/p7>''
self.parentMoc = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
self.parentMoc.persistentStoreCoordinator = self.persistentStoreCoordinator;
self.childMoc = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSMainQueueConcurrencyType];
self.childMoc.parentContext = self.parentMoc;
[self.parentMoc performBlock:^{
NSEntityDescription *desc = [NSEntityDescription entityForName:@"Widget" inManagedObjectContext:self.parentMoc];
Widget *w =[[Widget alloc] initWithEntity:desc insertIntoManagedObjectContext:self.parentMoc];
w.name = @"derp";