Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am n-b on github.
  • I am nb_ (https://keybase.io/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
n-b / Alimentation et agronomie.m3u
Last active Mar 1, 2017
C’est pas sorcier - Youtube
View Alimentation et agronomie.m3u
#EXTM3U
#EXTINF:-1,C'est pas sorcier - Sel de la mer à la terre
https://www.youtube.com/watch?v=ChUai6Wbm78
#EXTINF:-1,C'est pas sorcier -PESTICIDES
https://www.youtube.com/watch?v=Cqm6Ztr-ndg
#EXTINF:-1,C'est pas sorcier -CUISINE DE CHEF : la science des saveurs
https://www.youtube.com/watch?v=Kc2fjylFIa4
#EXTINF:-1,C'est pas sorcier - BANANES : sorciers à plein régime
https://www.youtube.com/watch?v=xguEgpLQV3k
#EXTINF:-1,C'est pas sorcier -CHAMPAGNE : LES SORCIERS SE FONT MOUSSER
View [UITableViewCell _ivarDescription]
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
n-b / TaggedDate.m
Last active Nov 13, 2015
NSDates are (sometimes) tagged pointers
View TaggedDate.m
@import Foundation;
int main() {
for (int i=0; i<100; i++) {
NSDate * date = NSDate.date;
printf("%p\n",date);
}
}
View private_ivars.m
@import Foundation;
@interface A : NSObject
@end
@interface B : A
@end
// Private objc ivars are really private:
@implementation A
{
View Blocks.m
#!/usr/bin/env objc-run
@import Foundation;
@interface NSBlock // bite me
@end
@implementation NSBlock (invoke)
- (void) invoke
{
View fp-obj-c.m
//#!/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
n-b / gist:405e12d431f5e62bb4ff
Created Dec 22, 2014
NSData hexadecimalRepresentation
View gist:405e12d431f5e62bb4ff
(lldb) po [@"Hello World" dataUsingEncoding:4]
<48656c6c 6f20576f 726c64>
(lldb) po [[@"Hello World" dataUsingEncoding:4] lowercaseHexStringWithoutSpaces]
48656c6c6f20576f726c64
(lldb) po [[@"Hello World" dataUsingEncoding:4] uppercaseHexStringWithoutSpaces]
48656C6C6F20576F726C64
(lldb) po [[@"Hello World" dataUsingEncoding:4] CKHexString]
@n-b
n-b / TestAttributedStrings.m
Created Jan 13, 2014
Demo for a NSAttributedString / HTML parsing issue on iOS 7
View TestAttributedStrings.m
@import UIKit;
#pragma mark - Main View Controller
@interface ViewController : UITableViewController
@end
@n-b
n-b / ClassDotSyntax.m
Created Jun 24, 2013
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
View ClassDotSyntax.m
// 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.
You can’t perform that action at this time.