Skip to content

Instantly share code, notes, and snippets.

View nubbel's full-sized avatar

Dominique d'Argent nubbel

View GitHub Profile
@nubbel
nubbel / AnyComparable.swift
Last active August 28, 2017 07:33 — forked from dabrahams/AnyComparable.swift
Faux Equatable and Comparable Existentials
fileprivate class AnyEquatableBase {
func isEqual(to other: AnyEquatableBase) -> Bool {
fatalError("isEqual(to:) must be overridden in subclass")
}
}
fileprivate final class AnyEquatableBox<T: Equatable> : AnyEquatableBase {
private let value: T
init(_ value: T) {
@nubbel
nubbel / xcbuild-debugging-tricks.md
Created June 9, 2017 08:36 — forked from ddunbar/xcbuild-debugging-tricks.md
Xcode new build system debugging tricks

New Build System Tricks

Command Line

# enable internal menu
defaults write com.apple.dt.Xcode ShowDVTDebugMenu -book YES

alias xcbuild=$(xcode-select -p)/../SharedFrameworks/XCBuild.framework/Versions/A/Support/xcbuild
class GooglePlayVerification
require 'google/api_client'
# Refer:
# https://code.google.com/p/google-api-ruby-client/issues/detail?id=72
# and
# http://jonathanotto.com/blog/google_oauth2_api_quick_tutorial.html
# and
# http://milancermak.wordpress.com/2012/08/24/server-side-verification-of-google-play-subsc/
GOOGLE_KEY = 'xxx-xxx.apps.googleusercontent.com'