Skip to content

Instantly share code, notes, and snippets.

View charmcitygavin's full-sized avatar

Gavin St. Ours charmcitygavin

View GitHub Profile
@mwaterfall
mwaterfall / StringExtensionHTML.swift
Last active May 6, 2024 10:14
Decoding HTML Entities in Swift
// Very slightly adapted from http://stackoverflow.com/a/30141700/106244
// 99.99% Credit to Martin R!
// Mapping from XML/HTML character entity reference to character
// From http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
private let characterEntities : [String: Character] = [
// XML predefined entities:
""" : "\"",
"&" : "&",
# A very basic Stack implemented with an array
# Makes use of the built in #pop and # push methods that exist for arrays.
class Stack
def initialize
@store = []
end
def push(x)
@store.push x
end
@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a