Skip to content

Instantly share code, notes, and snippets.

@g-mark
g-mark / LoginScreenModule.swift
Last active December 1, 2019 20:45
Lasso Intro Article
enum LoginScreenModule: ScreenModule {
enum Action: Equatable {
case didUpdateUsername(String)
case didUpdatePassword(String)
case didTapLogin
}
enum Output: Equatable {
case userDidLogin
@g-mark
g-mark / LanguageTest.swift
Last active December 1, 2019 15:04
Sytnax highlighting test
/*
| multi-line
| comment, with empty lines
| see: https://ww.com
*/
open class Blah: NSObject {
enum EmbedError: Error {
@g-mark
g-mark / URLComponents Example.swift
Created February 16, 2018 16:01
URLComponents Example
let pageIndex = 2
// base url
var components = URLComponents(string: "https://hostname.com/path")
// build query items as a String: String dictionary (easire to deal with that URLQueryItems)
var items: [String: String] = ["page": "\(pageIndex)", "message": "Hi mom & family!"]
items["fields"] = "_id,versionId,sourceType,name,_displayName,points"