Skip to content

Instantly share code, notes, and snippets.

@alexisakers
alexisakers / ConcurrentOperation.swift
Last active July 18, 2017 03:35 — forked from calebd/AsynchronousOperation.swift
Concurrent Operation in Swift 3
//
// ConcurrentOperation.swift
//
// Created by Caleb Davenport on 7/7/14.
//
// Learn more at http://blog.calebd.me/swift-concurrent-operations
//
import Foundation
@alexisakers
alexisakers / iOS Icon.png bash script
Last active July 5, 2018 04:33 — forked from jessedc/iOS Icon.png bash script
A simple bash script using OSX command line tool sips to resample a 1024x1024 image
#!/bin/bash
f=$(pwd)
sips --resampleWidth 512 "${f}/${1}" --out "${f}/iTunesArtwork.png"
sips --resampleWidth 1024 "${f}/${1}" --out "${f}/iTunesArtwork@2x.png"
sips --resampleWidth 20 "${f}/${1}" --out "${f}/Icon-App-20x20@1x.png"
sips --resampleWidth 40 "${f}/${1}" --out "${f}/Icon-App-20x20@2x.png"
sips --resampleWidth 60 "${f}/${1}" --out "${f}/Icon-App-20x20@3x.png"
sips --resampleWidth 29 "${f}/${1}" --out "${f}/Icon-App-29x29@1x.png"
sips --resampleWidth 58 "${f}/${1}" --out "${f}/Icon-App-29x29@2x.png"