Skip to content

Instantly share code, notes, and snippets.

View sdulaney's full-sized avatar

Stewart Dulaney sdulaney

View GitHub Profile
@sdulaney
sdulaney / firstIndexExample.swift
Created September 24, 2018 23:57
Example showing the Swift 4.2 method firstIndex, now working in Xcode 10.0.
let greeting = "Hello, world!"
let index = greeting.firstIndex(of: ",") ?? greeting.endIndex
let beginning = greeting[..<index]
// beginning is "Hello"
// Convert the result to a String for long-term storage.
let newString = String(beginning)
@sdulaney
sdulaney / tmux-cheatsheet.markdown
Created January 26, 2017 05:16 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname