Skip to content

Instantly share code, notes, and snippets.

tcp://193.0.214.42:80
tcp://213.109.72.155:80
### Keybase proof
I hereby claim:
* I am dtsurkan on github.
* I am dima_tsurkan (https://keybase.io/dima_tsurkan) on keybase.
* I have a public key ASAcQQCVsVBuzzTKSjI5iEFNtFikeCqB--RJY-FIu8tCfAo
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dtsurkan on github.
  • I am sirrobot (https://keybase.io/sirrobot) on keybase.
  • I have a public key ASCW-VVmtEbRhUDspgmWgv2m-o8-CqhOvv553EFUUWC6UAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am dtsurkan on github.
  • I am dimatsurkan (https://keybase.io/dimatsurkan) on keybase.
  • I have a public key ASDb8D0N1QGsrsQUakI72qLPBzrs2cjCWuzGGGWLV7aAQgo

To claim this, I am signing this object:

@dtsurkan
dtsurkan / JSONModelPlayground.swift
Created December 12, 2016 13:43 — forked from NSExceptional/JSONModelPlayground.swift
A concise example of deserializing a JSON response into a model object with as little "glue code" as possible.
import Foundation
typealias JSON = [String: Any]
// For joining Dictionaries; contents of `right` take preceedence over `left`
func + <K,V> (left: Dictionary<K,V>, right: Dictionary<K,V>?) -> Dictionary<K,V> {
guard let right = right else { return left }
var left = left
right.forEach { key, value in
@dtsurkan
dtsurkan / ocmock-cheatsheet.m
Created March 21, 2016 10:04 — forked from kharmabum/ocmock-cheatsheet.m
OCMock cheatsheet
/*----------------------------------------------------*/
#pragma mark - XCTAsserts
/*----------------------------------------------------*/
XCTAssert(expression, format...);
XCTAssertTrue(expression, format...);
XCTAssertFalse(expression, format...);
XCTAssertEqual(expression1, expression2, format...);
XCTAssertNotEqual(expression1, expression2, format...);
XCTAssertNil(expression, format...);
@import UIKit;
NS_ASSUME_NONNULL_BEGIN
@protocol MFBPreviewableCollectionView
- (nullable NSIndexPath *)mfb_previewableCollectionIndexPathForItemAtPoint:(CGPoint)point;
- (CGRect)mfb_previewableCollectionItemRectForIndexPath:(NSIndexPath *)indexPath;