Skip to content

Instantly share code, notes, and snippets.

Avatar

Rishabh Tayal RishabhTayal

View GitHub Profile
View 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"
View fastlane-template
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'
View data.json
{
"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 Sep 1, 2017
Lottie animation json for simple text animation
View dynamic_text.json
{
"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 Aug 15, 2017
!Takes 106ms to compile!
View 106 ms.swift
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()
}
View git commands.md

Delete all local branches

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

View Swift 3 Migration Guide.md

Swift 3 Changes

1. Simpler APIs, Omit unneccessary words.

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

let blue = UIColor.blueColor()
View ccache -s output
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
View URL meta tags parsing (WIP)
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
List of useful Xcode plugins.
View Xcode plugins.md
You can’t perform that action at this time.