Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#
# SignAndPackageForMAS.sh v1.0.1
#
# Codesign an app bundle and build a signed package ready for submission to the
# Mac App Store
#
# Copyright (c) 2014 Felix Schwarz (@felix_schwarz), IOSPIRIT GmbH (@iospirit)
#

Keybase proof

I hereby claim:

  • I am janx2 on github.
  • I am janx2 (https://keybase.io/janx2) on keybase.
  • I have a public key whose fingerprint is 174E E709 4D71 8181 229B BF3C 843C DD8C C631 4433

To claim this, I am signing this object:

@JanX2
JanX2 / commonPrefixLength-1.swift
Created June 8, 2014 18:19
Comparison of two approaches: one not using, one using optionals.
/**
* Determine the common prefix elements of two collections.
* @param collection1 First collection.
* @param collection2 Second collection.
* @return The number of elements common to the start of each collection.
*/
func commonPrefixLength<T: Swift.Collection, U: Swift.Collection where
T: Sequence, U: Sequence,
T.GeneratorType.Element: Equatable,
T.GeneratorType.Element == U.GeneratorType.Element>