Skip to content

Instantly share code, notes, and snippets.

Happy coding :)

Oliver Letterer OliverLetterer

Happy coding :)
  • Germany
Block or report user

Report or block OliverLetterer

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
OliverLetterer /
Created Jan 22, 2017
Transparent Git Encryption

Transparent Git Encryption

This document has been modified from its [original format][m1], which was written by Ning Shang ( It has been updated and reformatted into a [Markdown][m2] document by [Woody Gilk][m3] and [republished][m4].


When working with a remote git repository which is hosted on a third-party storage server, data confidentiality sometimes becomes

View gist:7febd3f8984e0f3247ca7c4b07a6dd1b
// The trick is to copy the DeviceSupport folder from the beta to the stable version.
cp -r /Applications/\ \(14A5261u\) /Applications/
// Then restart Xcode. You might need to do that for every beta of iOS 10/Xcode 8.
OliverLetterer / sethack.m
Created Mar 11, 2016 — forked from Catfish-Man/sethack.m
Demonstrating the trick of using stack-allocated mimics and sets for lookup tables instead of heap allocated keys and dictionaries
View sethack.m
// Compile with clang -framework Foundation sethack.m
#import <Foundation/Foundation.h>
#import <objc/runtime.h>
CFHashBytes from
#define ELF_STEP(B) T1 = (H << 4) + B; T2 = T1 & 0xF0000000; if (T2) T1 ^= (T2 >> 24); T1 &= (~T2); H = T1;
View tollfree.m
//Given this:
NSArray *objects = @[@1, @2, @3]
//These are equivalent in behavior
NSNumber *first = [objects objectAtIndex:0]
NSNumber *second = (NSNumber *)CFArrayGetValueAtIndex(0)
//But is the code that runs the same? Not so much… in the first one we do…
objc_msgSend(objects, <selector reference>, 0)
OliverLetterer /
Created Dec 30, 2015 — forked from briancroom/
Script to assist with conforming to XCTestCaseProvider
# Invoke this script with a Swift file containing an XCTestCase and it will
# generate an implementation for the `allTests` variable required for
# XCTestCaseProvider conformance on Linux
import sys
import re
inFile = open(sys.argv[1]) if len(sys.argv) > 1 else sys.stdin
OliverLetterer / terminal
Created Apr 3, 2015
Count insertions / deletions in git repo
View terminal
git log HEAD...3649b6a056d72524205b57791e7c78f3ac209f7e --numstat | grep ViewController.m | awk '{ INS += $1; DEL += $2 } END { print "+" INS " -" DEL }'

Record a screencast with QuickTime Player

  1. Connect an iOS defice with a cable
  2. In QuickTime Player: Option-Cmd-N (New Movie Recording) -> Select your device from the recording menu:

Install gifify

View NSArray+BadThirdPartyImplementation.m
@implementation NSArray (BadThirdPartyImplementation)
- (id)firstObject
return self[0];

The introduction to Reactive Programming you've been missing

(by @andrestaltz)

So you're curious in learning this new thing called (Functional) Reactive Programming (FRP).

Learning it is hard, even harder by the lack of good material. When I started, I tried looking for tutorials. I found only a handful of practical guides, but they just scratched the surface and never tackled the challenge of building the whole architecture around it. Library documentations often don't help when you're trying to understand some function. I mean, honestly, look at this:

Rx.Observable.prototype.flatMapLatest(selector, [thisArg])

Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence.


Keybase proof

I hereby claim:

  • I am OliverLetterer on github.
  • I am oletterer ( on keybase.
  • I have a public key whose fingerprint is 9910 2A1F 6875 18FD DD01 24B0 A3CC E071 1958 9637

To claim this, I am signing this object:

You can’t perform that action at this time.