Skip to content

Instantly share code, notes, and snippets.

diederich / gist:bb55910311ac432ddbcb2c212d8ec4d6
Created Mar 31, 2018
xcodebuild times - wholemodule/single-file clean and incremental builds
View gist:bb55910311ac432ddbcb2c212d8ec4d6
Clean builds
xcodebuild -project ext/CCUtils/CCUtils.xcodeproj -scheme CCUtils clean&& time xcodebuild -project ext/CCUtils/CCUtils.xcodeproj -scheme CCUtils build
real 0m17.229s
user 0m38.904s
sys 0m18.557s
real 0m10.724s
user 0m33.358s
diederich / Logging.swift
Created Nov 21, 2017
Module wide CocoalumberJack Logging without Include & module debug Level
View Logging.swift
// This file bridges logging commands from the current module to our logging
// library. You can call any DDLog… function from any Swift file in this module
// without having to import CocoaLumberjackSwift manually.
// This file should be copied into or included in any module where we want to
// provide this functionality.
// The overhead of this indirection should be zero because the compiler
// should inline all calls. (We could annotate the functions with
// `@inline(__always)` to enfore inlining, but that attribute is not officially
diederich / DateFormatterHelper.swift
Created Nov 18, 2017
Date Formatting Debug Helper
View DateFormatterHelper.swift
/// Debug helper for date parsing
/// add via decoder.dateDecodingStrategy = .custom(customDateFormatter)
func customDateFormatter(_ decoder: Decoder) throws -> Date {
let dateString = try decoder.singleValueContainer().decode(String.self)
let formatter = DateFormatter()
formatter.dateFormat = "YYYY-MM-DD'T'HH:mm:ss.SSSZ"
let date = dateString)
print("Asked to parse date: \(dateString) and got: \(date?.description ?? "-")")
return date ?? Date()
diederich / gist:f49670cf08613101b59ace318758b226
Last active Oct 18, 2020 — forked from jaylyerly/gist:932df9d754b0ce4cc836
Post notification to Slack after Xcode bot build
View gist:f49670cf08613101b59ace318758b226
#!/usr/bin/env python
import os
import requests
import json
print "Slack it up v.1.3"
slack_hook = "HOOK"
xcode_server_url = "xcbot://"
diederich / gist:3122244
Created Jul 16, 2012
Xcode::Archive::Post-Action HockeyApp upload
View gist:3122244
# Meant to be used as an Archive Post-Action script run from within Xcode
# basically there are 2 modes: Interactive and Automated Jenkins Mode.
# Interactive is the one that's used when you're doing the Archive. Once
# the Archive is done, HockeyApp pops up and asks what to do with the
# Archive.
# In Jenkins Mode, there's some more stuff to do. See below for details.