Skip to content

Instantly share code, notes, and snippets.

class ListDiff<T : Hashable> {
typealias IndexList = [Int]
typealias FromIndexToIndexList = [(from: Int, to: Int)]
// A list of indexes of where items were added.
let added: IndexList
// A list of indexes where items that have disappeared used to be.
let deleted: IndexList
// A list of tuples of indexes representing the old and new indexes of items that moved.
let moved: FromIndexToIndexList
@gwennguihal
gwennguihal / IOS_AppIcon_generator
Created May 15, 2014 10:29
IOS AppIcon generator
#!/bin/bash
f=$(pwd)
sips --resampleWidth 40 "${f}/${1}" --out "${f}/Icon-40.png"
sips --resampleWidth 80 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 120 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-29.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/[email protected]"
sips --resampleWidth 50 "${f}/${1}" --out "${f}/Icon-Small-50.png"
sips --resampleWidth 76 "${f}/${1}" --out "${f}/Icon-76.png"