Skip to content

Instantly share code, notes, and snippets.

Brett iOSBrett

  • Melbourne, Australia
Block or report user

Report or block iOSBrett

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
juliengdt / SomePlayground.swift
Last active Jul 29, 2017
Strongly Type Identifiers For Class Or Struct By Using Protocol and associated types
View SomePlayground.swift
In response of Tom Lokhort's article.
A third alternative: alternative 2 under steroïds
struct GenericIdentifier<T>: RawRepresentable, Hashable, Equatable {
let rawValue: String
regexident / AnyDiffable.swift
Created Mar 17, 2017 — forked from ollieatkinson/AnyDiffable.swift
Implementation of Paul Heckel's Diff Algorithm in Swift 3
View AnyDiffable.swift
public protocol Diffable: Hashable {
var primaryKeyValue: String { get }
public struct AnyDiffable: Diffable {
private let _primaryKeyValue: () -> String
marcoarment / gist:1105553afba6b4900c10
Created Oct 21, 2014
Variable-height UITableView tableHeaderView with autolayout
View gist:1105553afba6b4900c10
// in a UITableViewController (or any other view controller with a UITableView)
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator
UIView *header = [[UIView alloc] initWithFrame:CGRectMake(0, 0, size.width, 0)];
header.translatesAutoresizingMaskIntoConstraints = NO;
// [add subviews and their constraints to header]
NSLayoutConstraint *headerWidthConstraint = [NSLayoutConstraint
# Basic Turtle graphics module for Pythonista
# When run as a script, the classic Koch snowflake is drawn as a demo.
# The module can also be used interactively or from other scripts:
# >>> from turtle import *
# >>> right(30)
# >>> forward(100)
# ...
You can’t perform that action at this time.