Skip to content

Instantly share code, notes, and snippets.

@diederich
diederich / gist:f49670cf08613101b59ace318758b226
Last active October 18, 2020 00:06 — forked from jaylyerly/gist:932df9d754b0ce4cc836
Post notification to Slack after Xcode bot build
#!/usr/bin/env python
import os
import requests
import json
print "Slack it up v.1.3"
slack_hook = "HOOK"
xcode_server_url = "xcbot://your.server.name"
@diederich
diederich / gist:bb55910311ac432ddbcb2c212d8ec4d6
Created March 31, 2018 16:22
xcodebuild times - wholemodule/single-file clean and incremental builds
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
diederich / Logging.swift
Created November 21, 2017 15:25
Module wide CocoalumberJack Logging without Include & module debug Level
// 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
diederich / DateFormatterHelper.swift
Created November 18, 2017 20:24
Date Formatting Debug Helper
/// 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 = formatter.date(from: dateString)
print("Asked to parse date: \(dateString) and got: \(date?.description ?? "-")")
return date ?? Date()
}
@diederich
diederich / gist:3122244
Created July 16, 2012 11:37
Xcode::Archive::Post-Action HockeyApp upload
#!/bin/bash
#####
# 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.