Skip to content

Instantly share code, notes, and snippets.

@uliluckas
uliluckas / gist:3129990
Created July 17, 2012 15:12
mergeChangesFromContextDidSaveNotification with core data bug workarounds
// See http://lists.apple.com/archives/cocoa-dev/2008/Jun/msg00237.html for bugs below
- (void)mergeChangesFromContextDidSaveNotification:(NSNotification*)notification {
NSManagedObject *object;
NSSet* updates;
// Workaround bug 5982319
// Fault in all updated objects because chnages to faults won't trigger fetchedResultsControlle
updates = [notification.userInfo objectForKey:NSUpdatedObjectsKey];
for (object in updates) {
[[self.roManagedObjectContext objectWithID:[object objectID]] willAccessValueForKey:nil];
@shimondoodkin
shimondoodkin / APPNAME
Created July 2, 2011 17:33 — forked from peterhost/node_debian_init.sh
init.d script for node.js for debian
#! /bin/sh
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28