Skip to content

Instantly share code, notes, and snippets.

View christie-cb's full-sized avatar
🍵
chai

christie christie-cb

🍵
chai
  • Cambridge, England
View GitHub Profile
@fuxingloh
fuxingloh / Gradient.swift
Created June 23, 2017 15:17
How to add gradient on top and bottom of image view.
// Call this in layoutSubView or viewDidLoad
self.imageView.layer.sublayers?.forEach { $0.removeFromSuperlayer() }
let width = self.bounds.width
let height = self.bounds.height
let sHeight:CGFloat = 60.0
let shadow = UIColor.black.withAlphaComponent(0.6).cgColor
// Add gradient bar for image on top
let topImageGradient = CAGradientLayer()
@cohenadair
cohenadair / firebase-sandbox.md
Last active September 26, 2023 05:39
Setting up development and production Firebase environments for iOS

Firebase Environments

Last updated: October 21st, 2019.

At the time of writing this gist (January 4th, 2017), I was unable to find true sandboxing to separate development and production environments for a Firebase project. The closest we can get is to create two separate Firebase projects -- one for development and one for production.

Pros

  • Complete separation and isolation of all Firebase features.
  • Freedom to experiment without risking the corruption of production data.

Cons

@daegren
daegren / xcode-build-number-generator.sh
Last active May 23, 2022 11:21 — forked from alokc83/xcode-build-number-generator.sh
Script to automatically set the build number to the date
#!/bin/sh
# xcode-build-number-generator.sh
# @desc Automaticvally create build number every time using curent day, month and year
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"