Skip to content

Instantly share code, notes, and snippets.

View rajatmohanty's full-sized avatar

Rajat rajatmohanty

View GitHub Profile
import Foundation
import Alamofire
import RxSwift
import RxCocoa
protocol ClientProtocol {
func request<Response>(_ endpoint: Endpoint<Response>) -> Single<Response>
}
@rajatmohanty
rajatmohanty / clean_code.md
Created October 12, 2017 04:24 — forked from wojteklu/clean_code.md
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@rajatmohanty
rajatmohanty / Manually symbolicating partially symbolicated Crash Logs.md
Last active May 22, 2017 11:59
Understanding and Analyzing iOS Application Crash Reports

Instructions for manually symbolicating partially symbolicated Crash Logs in Xcode 7.2:

Create a folder on your computer. I called mine “Crash Stuff” in the example.

We’re going to need 3 things to symbolicate .crash files.

  1. The .dSYM that relates to the crash files.
  2. The symbolicatecrash script
  3. The .crash file that we want to symbolicate
@rajatmohanty
rajatmohanty / Code_review.md
Last active May 22, 2017 11:53
Code Review Checklist

Code Review Checklist

AMOP Principle

  • A — Accessible, is the code accessible?
  • M — Maintainable, can the code be easily reasoned about?
  • O — Organized, does the naming and file structure of the code make sense?
  • P — Performant, are there any performance issues introduced by the code?
@rajatmohanty
rajatmohanty / xcode_static_lib.sh
Last active May 21, 2017 15:47
Script to create Static Library in Xcode (Both for Simulator & Device)
//Original Content : http://yourcodesucksexception.blogspot.in/2015/11/things-ive-learned-while-building-ios.html
xcodebuild -workspace PULPulsate.xcworkspace -scheme PULPulsate -sdk iphonesimulator -configuration Release
xcodebuild -workspace PULPulsate.xcworkspace -scheme PULPulsate -sdk iphoneos -configuration Release
mkdir -p ${TARGET_BUILD_DIR}/../PULPulsate${CURRENT_PROJECT_VERSION}
cp -r ${TARGET_BUILD_DIR}/../Release-iphonesimulator/ ${TARGET_BUILD_DIR}/../PULPulsate${CURRENT_PROJECT_VERSION}
lipo -create "${TARGET_BUILD_DIR}/../Release-iphoneos/PULPulsate.framework/PULPulsate" "${TARGET_BUILD_DIR}/../Release-iphonesimulator/PULPulsate.framework/PULPulsate" -output "${TARGET_BUILD_DIR}/../PULPulsate${CURRENT_PROJECT_VERSION}/PULPulsate.framework/PULPulsate"
@rajatmohanty
rajatmohanty / QuickReferencePlayground.swift
Created March 30, 2017 04:20 — forked from 0xjorgev/QuickReferencePlayground.swift
This is a Quick Swift Reference Guide for TheSwift.ninja
// Playground - noun: a place where people can play
import Foundation
import UIKit
//Implicit inmutable variable
let dojoNinjas = 1
//Implicit mutable variable
var ninjaApprentices = 1500