Skip to content

Instantly share code, notes, and snippets.

@gkye
gkye / copy_appropriate_google-service-info-plist.sh
Created June 10, 2019 16:43 — forked from tylermilner/copy_appropriate_google-service-info-plist.sh
A shell script to selectively copy your GoogleService-Info.plist into your app bundle based on the current build configuration. (Dev, Staging & Production)
# Name of the resource we're selectively copying
GOOGLESERVICE_INFO_PLIST=GoogleService-Info.plist
# Get references to dev and prod versions of the GoogleService-Info.plist
# NOTE: These should only live on the file system and should NOT be part of the target (since we'll be adding them to the target manually)
GOOGLESERVICE_INFO_DEV=${PROJECT_DIR}/${TARGET_NAME}/Firebase/Dev/${GOOGLESERVICE_INFO_PLIST}
@gkye
gkye / SwiftyProgressHUD.swift
Created May 4, 2018 01:00 — forked from mspvirajpatel/SwiftyProgressHUD.swift
SwiftyProgressHUD is a Swift based clean and easy-to-use HUD meant to display the progress of an ongoing task on iOS
//
// SwiftyProgressHUD.swift
// mWELL
//
// Created by Shubham Naik on 11/07/17.
// Copyright © 2017 Shubham. All rights reserved.
//
import UIKit
class SwiftyProgressHUD: UIView {
@gkye
gkye / UIImage+PixelColor.swift
Created August 20, 2016 23:42 — forked from marchinram/UIImage+PixelColor.swift
iOS Swift UIImage subscript extension to get pixel color
import UIKit
extension UIImage {
subscript (x: Int, y: Int) -> UIColor? {
if x < 0 || x > Int(size.width) || y < 0 || y > Int(size.height) {
return nil
}
class VerticalLayout: UIView {
var yOffsets: [CGFloat] = []
init(width: CGFloat) {
super.init(frame: CGRectMake(0, 0, width, 0))
}
required init(coder aDecoder: NSCoder) {