This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( find . -type d -name ".git" && find . -name ".gitignore" && find . -name ".gitmodules" ) | xargs rm -rf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# An amalgamation of .gitignore files from: https://github.com/github/gitignore/ | |
# ==== | |
# macOS: gitignore/Global/macOS.gitignore | |
# ==== | |
# General | |
.DS_Store | |
.AppleDouble | |
.LSOverride |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import CoreLocation | |
extension CLLocationCoordinate2D: Equatable { | |
public static func ==(lhs: CLLocationCoordinate2D, rhs: CLLocationCoordinate2D) -> Bool { | |
return lhs.latitude == rhs.latitude && lhs.longitude == rhs.longitude | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension DateFormatter { | |
static let iso8601: DateFormatter = { | |
let formatter = DateFormatter() | |
formatter.calendar = Calendar(identifier: .iso8601) | |
formatter.locale = Locale(identifier: "en_US_POSIX") | |
formatter.timeZone = TimeZone(secondsFromGMT: 0) | |
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Recursively create .gitkeep files | |
# Git tracks files, and not directories. This means any empty directories in your source project will be | |
# omitted whenever the source code is cloned via Git. Sometimes though you want to keep these directories | |
# (a typical example being when you want to a directory to hold log files or some other runtime artefacts). | |
# To preserve empty directories within a Git project, users typically create a hidden `.gitkeep` file and commit | |
# that file to source control for each empty directory they wish to keep. Creating these by hand can be a bit of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func test<#name#>() { | |
XCTFail("Test isn't implemented yet") | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Courtesy of https://medium.com/ios-os-x-development/highlight-warnings-in-xcode-521125121a75 | |
TAGS="TODO:|FIXME:|WARNING:" | |
ERRORTAG="ERROR:" | |
find "${SRCROOT}" \( -name "*.h" -or -name "*.m" -or -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($TAGS).*\$|($ERRORTAG).*\$" | perl -p -e "s/($TAGS)/ warning: \$1/"| perl -p -e "s/($ERRORTAG)/ error: \$1/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Florent Pillet on 14/11/16. | |
// Copyright (c) 2016 Florent Pillet. All rights reserved. | |
// | |
import Foundation | |
/* | |
* A utility struct that helps mesure the performance of sections of code. Only uses Foundation | |
* (we could also use QuartzCore's CACurrentMediaTime() for similar precision) |