Skip to content

Instantly share code, notes, and snippets.

View jwhitley's full-sized avatar
🏝️
balearic

John Whitley jwhitley

🏝️
balearic
View GitHub Profile
@jwhitley
jwhitley / firebase-sandbox.md
Created January 11, 2017 19:08 — forked from cohenadair/firebase-sandbox.md
Setting up development and production Firebase environments for iOS

Firebase Environments

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

  • There is no way to copy production data to your development project (that I am aware of).
  • Any settings changes made to your development project also needs to be manually applied to your production project.
// This is a "rough sketch" pulled from our application that shows how we use
// RxBluetoothKit and Nordic's DFU library together. It's more than
// pseudocode, yet not standalone, rigorously tested running code. A lot of
// details are simplified or omitted here, e.g. any device-specific details
// you may require, implementations for Nordic's DFU delegate protcols, etc.
import iOSDFULibrary // Nordic's DFU Library
import RxBluetoothKit
enum ExampleDeviceService: String, ServiceIdentifier {

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
@jwhitley
jwhitley / repotest.zsh
Last active January 14, 2024 17:59
Shell script that replicates lazygit repo_paths_test.go scenarios
#!/bin/zsh
startPath=`pwd`
setupTmpdir() {
relTmpDir=`mktemp -d /tmp/lazygitRepoPath.XXXXXX`
TMPDIR=`realpath "$relTmpDir"`
cd $TMPDIR
}