Skip to content

Instantly share code, notes, and snippets.

View RishabhTayal's full-sized avatar

Rishabh Tayal RishabhTayal

  • Chicago, IL
View GitHub Profile
@RishabhTayal
RishabhTayal / Fastfile
Last active November 20, 2017 20:33
Fastfile
platform :ios do
desc "\033[1mDeploy PersonalShopper to iTunes Connect\033[0m"
desc "This action does the following:"
desc "- Post the message on Slack"
desc "- Input version number from user"
desc "- Increament version number"
desc "- Increament build number"
desc "- Generate build"
desc "- Push the changed plist to git remote"
update_fastlane
default_platform :ios
ENV['DELIVER_ITMSTRANSPORTER_ADDITIONAL_UPLOAD_PARAMETERS'] = '-t DAV'
platform :ios do
before_all do
# ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."
# ENV['DEVELOPER_DIR'] = '/Applications/Xcode old/Xcode-beta.app/Contents/Developer'
{
"v":"4.10.1",
"fr":29.9700012207031,
"ip":0,
"op":2038.00008300944,
"w":375,
"h":668,
"nm":"Clientele_Instory",
"ddd":0,
"assets":[
@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":[
@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 / 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

Swift 3 Changes

1. Simpler APIs, Omit unneccessary words.

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

let blue = UIColor.blueColor()
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
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)
@RishabhTayal
RishabhTayal / Xcode plugins.md
Last active May 16, 2016 05:35
List of useful Xcode plugins.