Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am n-b on github.
  • I am nb_ ( on keybase.
  • I have a public key whose fingerprint is 7986 EEEE 8135 07D0 F9AB C21E 87FD 5957 5246 035A

To claim this, I am signing this object:

n-b / Alimentation et agronomie.m3u
Last active March 1, 2017 13:30
C’est pas sorcier - Youtube
#EXTINF:-1,C'est pas sorcier - Sel de la mer à la terre
#EXTINF:-1,C'est pas sorcier -PESTICIDES
#EXTINF:-1,C'est pas sorcier -CUISINE DE CHEF : la science des saveurs
#EXTINF:-1,C'est pas sorcier - BANANES : sorciers à plein régime
in UITableViewCell:
_tableView (<UITable_UITableViewCellDelegate>*): nil
_layoutManager (id): <UITableViewCellLayoutManager: 0x6080000150a0>
_target (id): nil
_editAction (SEL): (null)
_accessoryAction (SEL): (null)
_oldEditingData (_UITableViewCellOldEditingData*): nil
_editingData (id): nil
_rightMargin (double): 0
_indentationLevel (long): 0
n-b / TaggedDate.m
Last active November 13, 2015 09:04
NSDates are (sometimes) tagged pointers
@import Foundation;
int main() {
for (int i=0; i<100; i++) {
NSDate * date =;
@import Foundation;
@interface A : NSObject
@interface B : A
// Private objc ivars are really private:
@implementation A
n-b / Blocks.m
Last active August 24, 2016 11:37
#!/usr/bin/env objc-run
@import Foundation;
@interface NSBlock // bite me
@implementation NSBlock (invoke)
- (void) invoke
n-b / fp-obj-c.m
Created February 9, 2015 09:28
//#!/usr/bin/env objc-run
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
#import <objc/message.h>
/// Typedefs
typedef id (^TargetMethod)(id arg);
n-b / gist:405e12d431f5e62bb4ff
Created December 22, 2014 14:09
NSData hexadecimalRepresentation
(lldb) po [@"Hello World" dataUsingEncoding:4]
<48656c6c 6f20576f 726c64>
(lldb) po [[@"Hello World" dataUsingEncoding:4] lowercaseHexStringWithoutSpaces]
(lldb) po [[@"Hello World" dataUsingEncoding:4] uppercaseHexStringWithoutSpaces]
(lldb) po [[@"Hello World" dataUsingEncoding:4] CKHexString]
n-b / TestAttributedStrings.m
Created January 13, 2014 10:05
Demo for a NSAttributedString / HTML parsing issue on iOS 7
@import UIKit;
#pragma mark - Main View Controller
@interface ViewController : UITableViewController
n-b / ClassDotSyntax.m
Created June 24, 2013 20:24
Sample code for a couple of Radars on dot-syntax: rdar://14250868 Dot syntax on Class methods only compiles with public methods rdar://14250709 Xcode does not always autocomplete the dot-syntax
// The behaviour for dot-syntax is inconsistent in two aspects.
// 1. Autocompletion
// @properties and instance methods declared in the @interface block are autocompleted in Xcode with the dot-syntax;
// However class methods and private instance method are not autocompleted, although they are perfectly valid.
// Moreover, the class method are suggested in autocompletion after an instance variable.
// (in the example below, that would be instance.classMethod.
// Autocompletion should be suggested whenever the syntax is valid.