Skip to content

Instantly share code, notes, and snippets.

View RishabhTayal's full-sized avatar

Rishabh Tayal RishabhTayal

  • Chicago, IL
View GitHub Profile
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}")
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}"
# Customise this file, documentation can be found here:
# https://github.com/KrauseFx/fastlane/tree/master/docs
# All available actions: https://github.com/KrauseFx/fastlane/blob/master/docs/Actions.md
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# By default, fastlane will send which actions are used
# No personal data is shared, more information on https://github.com/fastlane/enhancer
@RishabhTayal
RishabhTayal / Xcode plugins.md
Last active May 16, 2016 05:35
List of useful Xcode plugins.
let urlString = "http://www.nytimes.com/2016/04/07/us/politics/donald-trump-and-hillary-clinton-look-to-rebound-in-new-york.html?_r=0"
let photoData = NSMutableData(contentsOfURL: NSURL(string: urlString)!)
let dataString = String(data: photoData!, encoding: NSUTF8StringEncoding)
do {
// <meta property=\"og:image
let regex = try NSRegularExpression(pattern: "<meta.*property=\"og:image\".*content=\"(.*)\".*\\/>", options: .CaseInsensitive)
cache directory /Users/rtayal/.ccache
primary config /Users/rtayal/.ccache/ccache.conf
secondary config (readonly) /usr/local/Cellar/ccache/3.3.3/etc/ccache.conf
cache hit (direct) 0
cache hit (preprocessed) 0
cache miss 0
cache hit rate 0.00 %
called for link 5
unsupported compiler option 9
no input file 3

Swift 3 Changes

1. Simpler APIs, Omit unneccessary words.

helloString.stringByAppendingString("world")
helloString.appending("world")

let blue = UIColor.blueColor()
@RishabhTayal
RishabhTayal / git commands.md
Last active June 6, 2017 18:26
Git Commands

Delete all local branches

git branch | grep -v "master" | xargs git branch -D

@RishabhTayal
RishabhTayal / 106 ms.swift
Last active August 15, 2017 21:54
!Takes 106ms to compile!
class func animateLeftToRight(_ view: SpringLabel) {
view.animation = "fadeInRight"
view.duration = 2.0
view.force = 0.4
view.velocity = 0.3
view.damping = 1
view.curve = "easeIn"
view.animate()
}
@RishabhTayal
RishabhTayal / dynamic_text.json
Created September 1, 2017 17:18
Lottie animation json for simple text animation
{
"v":"4.10.1",
"fr":29.9700012207031,
"ip":0,
"op":45.0000018328876,
"w":375,
"h":668,
"nm":"text_test",
"ddd":0,
"assets":[
{
"v":"4.10.1",
"fr":29.9700012207031,
"ip":0,
"op":2038.00008300944,
"w":375,
"h":668,
"nm":"Clientele_Instory",
"ddd":0,
"assets":[