Skip to content

Instantly share code, notes, and snippets.

fastred /
Last active Feb 6, 2022

Results of searching for NS_SWIFT_UNAVAILABLE macro in iOS 9 and OS X 10.11 headers reveal some new Swift-specific APIs.


70: - (nullable GKComponent *)componentForClass:(Class)componentClass
NS_SWIFT_UNAVAILABLE("Exposed in Swift as componentForClass<ComponentType: GKComponent>(componentClass: ComponentType.Type) -> ComponentType?");

sharplet / .clang-format
Created Apr 13, 2015
clang-format file for Objective-C projects
View .clang-format
AlignTrailingComments: true
AllowShortFunctionsOnASingleLine: Inline
AllowShortIfStatementsOnASingleLine: true
BasedOnStyle: LLVM
BreakBeforeBraces: Attach
ColumnLimit: 120
IndentWidth: 2
KeepEmptyLinesAtTheStartOfBlocks: false
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
sharplet / ConcatenateSequence.swift
Created Feb 9, 2015
Generic concatenation of sequences in Swift
View ConcatenateSequence.swift
func + <S: SequenceType, E where S.Generator.Element == E> (lhs: S, rhs: S) -> GeneratorOf<E> {
var (g, h) = (lhs.generate(), rhs.generate())
return GeneratorOf { ??
sharplet /
Last active Jun 8, 2018
Unearned Stack Overflow badges Dashing widget

Badge Overflow

An exceptionally handsome way to track your Stack Overflow badges.

Created by Adam & Stephanie Sharp.

Unearned Badges widget

A Dashing widget that tracks your progress toward unearned badges on Stack Overflow.