Skip to content

Instantly share code, notes, and snippets.

View gauravkeshre's full-sized avatar

Gaurav K gauravkeshre

View GitHub Profile
@gauravkeshre
gauravkeshre / Glossary.md
Last active November 3, 2022 14:24
Decoding Tech Jargons
ABBR Full Usage Link
TSG Troubleshooting Guide Documentation
LLT Long Lived Token Authentication & Authorisation
CA Conditional Access Authentication & Authorisation
CAE Continuous Access Evaluation Authentication & Authorisation Microsoft Dev Doc
NFR Non Functional Requirements Software Engineering https://www.scaledagileframework.com/nonfunctional-requirements/
SSM Smart Session Mgmt Authentication & Authorisation
@gauravkeshre
gauravkeshre / archive_info_readme.md
Last active November 2, 2022 14:05
AddBranchDescriptionToArchiveDescription

Objective

Get some information about the Branch and Commit in the archive comment in xcode organizer

Setup

  1. Launch Xcode
  2. Open Schema management ( + ^ + i )
  3. Select "Atchive" tab
  4. Under Archive tab, select "Post-actions"
  5. + > "New Run Script Action"
  6. Paste the below script
@gauravkeshre
gauravkeshre / readme.md
Last active March 31, 2022 12:22
Create a CherryPick Pull request manually from terminal

Create a CherryPick Pull request manually from terminal

Considering you are working on a bugfix that needs to be merged into a release branch

Pre-requisite

  1. Make sure your branch is merged into develop
  2. Keep the SHA for the above merge handy
  3. Make sure you have latest target release branch pull in your local system
@gauravkeshre
gauravkeshre / zshrc_custom_prompt.md
Created September 21, 2021 17:23
Custom Prompt for zsh in macOS Big Sur

ZCH seem to be the default shell for MacOs BigSur Terminals Which means that the old bash commands to beautify the terminal prompts are outdated. Here is a fresh new prompt for ZSH Terminal

Steps

  1. touch ~/.zshrc
  2. copy and paste from line 10 of this file
  3. save the .zshrc file
  4. run source ~/.zshrc
@gauravkeshre
gauravkeshre / inspect_provisioning.md
Last active September 21, 2021 17:21
Check if a provisioning profile contains your development certificate

There are times, when working with larger teams at larger organizations, when you do not have complete control over the Apple Developer Account. And there is some process to get access to basic provisining instruments.

In such cases what usually happens is that you do not have privilages to modify Provisioning Profiles and Production Certificates.

You can, however, generate your certificate and submit it to the admin, they should add your certificate to all development provisioning profile.

At times, when provisioning Gods are angry and you don't have visibilty, you will want to be able to

  1. Download Development Provisioning profiles
  2. Inspect them
  3. See if your development certificate is added to it.
@gauravkeshre
gauravkeshre / ClassOnlyProtocols-ExistentialContainer.md
Last active March 17, 2019 11:02
ExistentialContainer Observation: Size of the reference to an existential container on a class-only protocol is 16 bytes while on normal protocol is 40 bytes.
import UIKit

/// Protocol
protocol ClassOnlyprotocol: AnyObject {
    var identifier: String {get}
    var link: String {get }
}

protocol NormalProtocol{
@gauravkeshre
gauravkeshre / Readme.md
Created January 13, 2019 20:58
Pocket reference to creating private cocoapods

Pocket reference to creating private cocoapods

Git repositories

This process requires you to create 2 git repositories.

  1. pod-specs repo 1.1 This repo holds the specs for all the private pods. 1.2 You only have to create this once per organization (assuming your private pods are limited to an organization)

  2. Library repo 2.1 This repo contains the code of the component/library that you need to reuse and import in other projects using pod install

@gauravkeshre
gauravkeshre / README_ LaunchProjectInTerminal.md
Last active January 15, 2019 13:45
Launch terminal and CD into the current project directory.

Launch Terminal and open Xcode project directory in that

Add New Behavior
  1. Launch Xcode > Preferences > Behaviors
  2. + to add
  3. Rename "New Behavior" to something more meaningful "Launch Terminal"
Key Binding
  1. Tap on ⌘ opposite to Behavior name
@gauravkeshre
gauravkeshre / Readme-Code.md
Last active January 13, 2019 19:52
# Binary representation of a FixedWidthInteger with padding zeros.

Binary representation of a FixedWidthInteger with padding zeros

An initializer in String class String(5, radix: 2) creates a string which is a binary representation of 5 as : 101 But it will not give a padded version (for obvious and good reasons) like 00000101 or 00000000 00000101 which may be desirable in some cases

Here are two approaches of achieving this :

1.

@gauravkeshre
gauravkeshre / Readme-Code.md
Last active January 13, 2019 19:51
A simple playground gist that demonstrates how we can leverage performSelector for achieving basic polling-like behaviour in swift.

How to implement polling using performSelector

import Foundation
import PlaygroundSupport

PlaygroundPage.current.needsIndefiniteExecution = true