Skip to content

Instantly share code, notes, and snippets.

View matthew-healy's full-sized avatar
🤡

matthew healy matthew-healy

🤡
View GitHub Profile
@matthew-healy
matthew-healy / git-debranch
Created January 9, 2020 19:31
How do I delete all local branches except master and the one I'm currently on?
#!/usr/bin/env bash
current_branch_name=`git rev-parse --abbrev-ref HEAD`
git branch \
| grep -v master \
| grep -v $current_branch_name \
| xargs git branch -D
import Foundation
// Swift translation of https://pspdfkit.com/blog/2016/running-ui-tests-with-ludicrous-speed/
class ConditionTester {
typealias TestCondition = () -> (Bool)
private let condition: TestCondition
private var fulfilled: Bool { return condition() }
private var currentRunLoop: CFRunLoop {
return RunLoop.current.getCFRunLoop()