Skip to content

Instantly share code, notes, and snippets.

View seanho's full-sized avatar

Sean Ho seanho

View GitHub Profile

RubyMotion 2.8 is released

This update includes support for iOS 7, 64bit binaries and most importantly faster build time! Clean compilation takes 1/3 of the time compared to previous version.


AFNetworking 2.0 is released

The most widely used open source projects for iOS is going to release its first major update later this week. This includes better serialization, real-time connection support and more. Interestingly it supports iOS 7 only.

Install Node.js version manager

Install nvm or n


Install Node.js version 6

nvm install 6 or n 6.11

@seanho
seanho / Log.swift
Created August 4, 2017 12:12
os_log() wrapper
import os.log
import Foundation
public struct Log {
static let log = OSLog(subsystem: "domain", category: "App")
static public func debug(_ message: Any) {
os_log("⚪️ DEBUG - %@", log: log, type: .debug, "\(message)")
}
@seanho
seanho / Lens.swift
Last active February 21, 2019 00:25
KeyPath based Lens implementation
protocol LensType {
associatedtype Container
associatedtype View
func get() -> View
func set(_ newValue: View) -> Container
}
protocol KeyPathInstantiatable {
init(mapper: KeyPathMapper<Self>)
@seanho
seanho / markdown.swift
Created July 28, 2025 23:46
AttribuedString markdown parsing
let attrString = try AttributedString(markdown: markdown)
for (intentBlock, intentRange) in attrString.runs[\.presentationIntent] {
guard let intentBlock else { continue }
for intent in intentBlock.components {
switch intent.kind {
case .paragraph:
case let .header(level):
case .orderedList:
case .unorderedList: