Skip to content

Instantly share code, notes, and snippets.

View hashier's full-sized avatar
🦆

Christopher Loessl hashier

🦆
View GitHub Profile
@hashier
hashier / strong-copy.m
Created February 25, 2014 21:23
Property: What's the difference between strong and copy. Blogpost: http://stackenblochen.blogsport.eu/2014/02/25/property-strong-and-copy/
//
// main.m
// strong_retain_copy
//
// Created by Christopher Loessl on 25/02/14.
// Copyright (c) 2014 Christopher Loessl. All rights reserved.
//
#import <Foundation/Foundation.h>
@hashier
hashier / block.m
Last active August 29, 2015 13:56
Blocks on stack and on the heap and pointers to it
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
typedef int(^Block)(void);
void *p0, *p1;
Block blockOnStack[3];
@hashier
hashier / .lldbinit
Last active August 29, 2015 13:59 — forked from mayoff/.lldbinit
command script import ~/Library/lldb/sniff_objc_exception_throw.py
@hashier
hashier / block copy.m
Created May 13, 2014 17:42
How to call blocks?
#import <Foundation/Foundation.h>
// 2nd class
@interface DownTheLine : NSObject
@end
@implementation DownTheLine
-(void)deepDown:(void (^)(int var))completionHandler {
completionHandler(4);
@hashier
hashier / output.txt
Created June 4, 2014 18:43
Clang and return types
2014-06-04 20:43:10.363 Untitled 9[49902:507] Output: http://www.apple.com
2014-06-04 20:43:10.365 Untitled 9[49902:507] Output: NSString
@hashier
hashier / main.m
Last active December 19, 2015 13:59
KVC / KVO
//
// main.m
// KVO
//
// Created by Christopher Loessl on 7/14/13.
// Copyright (c) 2013 Christopher Loessl. All rights reserved.
//
/*
* The code is based on a tutorial from:
#import <Foundation/Foundation.h>
#ifdef DEBUG
#define NSLog(args...) ExtendNSLog(__FILE__,__LINE__,__PRETTY_FUNCTION__,args);
#else
#define NSLog(x...)
#endif
void ExtendNSLog(const char *file, int lineNumber, const char *functionName, NSString *format, ...);
@hashier
hashier / common.h
Last active December 22, 2015 07:18
my common.h for ObjC
//
// common.h
// Common helper stuff
//
// Created by Christopher Loessl.
// Copyright (c) 2013 Christopher Loessl. All rights reserved.
//
#ifndef hashier_common_h
#define hashier_common_h
#!/bin/sh
# FindInFile.sh
#
#
# Created by Gregory Hill on 2/28/13.
#
# Usage:
# ./FindInFile.sh <baseDir>
# e.g. ~/Desktop/Code/Pandora/dev/Pandora

Keybase proof

I hereby claim:

  • I am hashier on github.
  • I am hashier (https://keybase.io/hashier) on keybase.
  • I have a public key whose fingerprint is 8A66 095F 4960 62DB D3D1 80D5 44F1 DB06 C926 11B4

To claim this, I am signing this object: