Skip to content

Instantly share code, notes, and snippets.

@n-b
n-b / utf8.rb
Last active September 30, 2024 15:19
utf8.rb
#! ruby
module Foo_é
def self.bla
puts "bla"
end
end
module Foo_é
def self.baz
puts "baz"

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 March 1, 2017 13:30
C’est pas sorcier - Youtube
#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
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 November 13, 2015 09:04
NSDates are (sometimes) tagged pointers
@import Foundation;
int main() {
for (int i=0; i<100; i++) {
NSDate * date = NSDate.date;
printf("%p\n",date);
}
}
@import Foundation;
@interface A : NSObject
@end
@interface B : A
@end
// Private objc ivars are really private:
@implementation A
{
@n-b
n-b / Blocks.m
Last active August 24, 2016 11:37
#!/usr/bin/env objc-run
@import Foundation;
@interface NSBlock // bite me
@end
@implementation NSBlock (invoke)
- (void) invoke
{
@n-b
n-b / fp-obj-c.m
Created February 9, 2015 09:28
fp-obj-c
//#!/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 December 22, 2014 14:09
NSData hexadecimalRepresentation
(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 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
@end