Skip to content

Instantly share code, notes, and snippets.

View paykroyd's full-sized avatar

Pete Aykroyd paykroyd

  • Google
  • Cambridge MA
View GitHub Profile
@paykroyd
paykroyd / lion-fullscreen.patch
Created August 25, 2012 22:32 — forked from cefstat/lion-fullscreen.patch
Patch for Emacs fullscreen support under Mac OS X 10.7 (Lion)
=== modified file 'lisp/term/ns-win.el'
--- old/lisp/term/ns-win.el 2011-10-01 20:32:01 +0000
+++ new/lisp/term/ns-win.el 2011-11-10 16:22:51 +0000
@@ -928,6 +928,10 @@
(add-to-list 'frame-creation-function-alist '(ns . x-create-frame-with-faces))
(add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system))
+(declare-function ns-toggle-fullscreen-internal "nsfns.m" ())
+(defun ns-toggle-fullscreen ()
+ (interactive)
@paykroyd
paykroyd / gist:3669723
Created September 7, 2012 21:16
Group By in Core Data
NSFetchRequest *request = [self fetchRequestForType:CORE_DATA_BLOCK_TYPE];
NSEntityDescription* entity = [NSEntityDescription entityForName:CORE_DATA_BLOCK_TYPE
inManagedObjectContext:self.managedObjectContext];
NSAttributeDescription* typeDesc = [entity.attributesByName objectForKey:@"type"];
NSExpression *countExpression = [NSExpression expressionForFunction: @"count:"
arguments: [NSArray arrayWithObject:[NSExpression expressionForKeyPath: @"type"]]];
NSExpressionDescription *expressionDescription = [[NSExpressionDescription alloc] init];
[expressionDescription setName: @"count"];
[expressionDescription setExpression: countExpression];

Keybase proof

I hereby claim:

  • I am paykroyd on github.
  • I am aykroyd (https://keybase.io/aykroyd) on keybase.
  • I have a public key whose fingerprint is F1DA 9A7B 50B6 047D C851 90A9 E038 851D F1B7 3563

To claim this, I am signing this object: