Skip to content

Instantly share code, notes, and snippets.

View peterfriese's full-sized avatar
🔥

Peter Friese peterfriese

🔥
View GitHub Profile
@peterfriese
peterfriese / UIViewController.h
Created November 30, 2011 20:54
Do I need to call didMoveToParentViewController in my custom container view controller? Yes, you do, the doc says it
// Taken from UIViewController.h, code is (c) Apple
/*
These two methods are public for container subclasses to call when transitioning between child
controllers. If they are overridden, the overrides should ensure to call the super. The parent argument in
both of these methods is nil when a child is being removed from its parent; otherwise it is equal to the new
parent view controller.
addChildViewController: will call [child willMoveToParentViewController:self] before adding the
child. However, it will not call didMoveToParentViewController:. It is expected that a container view
@peterfriese
peterfriese / gist:1267775
Created October 6, 2011 15:55
The Eysholdt Filter
var eysholdtFilter = new SimpleFilter(function(data) {
session = data;
session.abstract = session.abstract.replace(/<\/br>\n<\/br>\n/g, "\n");
session.abstract = session.abstract.replace(/<\/b>/g, "</b>");
session.abstract = session.abstract.replace(/<br>\n/g, "\n");
session.abstract = session.abstract.replace(/<\/br>\n/g, "\n");
return session;
});
I made this gist with Gist: The Script (see https://github.com/defunkt/gist)