Skip to content

Instantly share code, notes, and snippets.

View ChrisXu's full-sized avatar
🤖
I'm listening

Chris Xu ChrisXu

🤖
I'm listening
View GitHub Profile
@ChrisXu
ChrisXu / constants_example_1.swift
Created October 18, 2018 07:14
Constants vs Environments
let googleTrackingID = Constants.beta.trackingID
let googleTrackingID = Environments.trackingID
@ChrisXu
ChrisXu / Backend.swift
Last active April 25, 2018 07:16
Generic Backend class
import Foundation
public enum BackendError: Error {
case invalid(String)
case notFound(String)
}
public protocol Backend {
def isSubsequence(self, s, t):
"""
:type s: str
:type t: str
:rtype: bool
"""
if len(s) > len(t):
return False
k = 0
@ChrisXu
ChrisXu / .travis.yml
Last active January 16, 2019 22:14
Deploy an app automatically to Fabric Beta using Travis-CI.
language: objective-c
osx_image: xcode7.2
xcode_sdk: iphonesimulator9.2
env:
global:
- LANG=en_US.UTF-8
- WORKSPACE="YOUR_APP_WORKSPACE/YOUR_APP_PROJECT.xcworkspace"
- SCHEME="YOUR_BUILDSCHEME"
- APP_NAME="YOUR_APP_NAME"