Skip to content

Instantly share code, notes, and snippets.

View mtitolo's full-sized avatar

Michele mtitolo

View GitHub Profile
class BaseClass {
class func entityName() -> String {
return ""
}
}
class FirstClass: BaseClass {
override class func entityName() -> String {
return "FirstClass"
}
@mtitolo
mtitolo / Protocol-typealias.swift
Created December 16, 2015 23:40
Protocol typealias
protocol SomeProtocol {
typealias SomeFunc = () -> Void
}
extension SomeProtocol {
func doSomething(someFunc: SomeFunc) {
someFunc() // Invalid use of '()' to call a value of non-function type 'Self.SomeFunc'
}
}
@mtitolo
mtitolo / Protocol-Inheritance.swift
Created November 10, 2015 20:04
Protocol Inheritance
protocol A {}
protocol B: A {}
protocol C {
var something: A { get set }
}
struct BB: B {}
@mtitolo
mtitolo / contributing.md
Last active December 16, 2015 17:29
Cocoapods Guides Refresh

How can I contribute?

Picking Up Issues

####Issue Classifications

  • Defect: These are known bugs. The issue should also contain steps to reproduce. Feel free to fix these and submit a pull request.
  • Enhancement: These are planned enhancements that have not been picked up yet. If you would like to work on one, please add a comment that you are doing so.
  • Discussion: These are issues that can be non-issues, and encompass best practices, or plans for the future.
  • Quick: These are small issues, that should be able to be fixed quickly. Normally these issues don't stay around for very long.
@mtitolo
mtitolo / todo
Created April 1, 2013 23:09
My ToDo app
set theFile to (path to desktop as text) & "todo.txt"
tell application "Finder"
open file theFile
end tell
@mtitolo
mtitolo / open instaweb in chrome
Last active December 11, 2015 02:58
How to get instaweb running on OSX and opening in Chrome. Run these commands!
$ brew install lighttpd
$ git config --global instaweb.browser ch
$ git config --global browser.ch.cmd "open -a \"/Applications/Google Chrome.app\""
@mtitolo
mtitolo / slides.md
Created July 23, 2012 23:35 — forked from alunny/slides.md
PhoneGap Day Talks