Skip to content

Instantly share code, notes, and snippets.

@alexisakers
alexisakers / MCPeerID+Reusable.swift
Last active September 21, 2016 09:00
Create stable and reusable MCPeerIDs
/*
* ==---------------------------------------------------------------------------------==
*
* File : MCPeerID+Reusable.swift
* Project : MCPeerID+Reusable
* Author : ALEXIS AUBRY RADANOVIC
* Creation Date : SEPTEMBER 21 2016
*
* License : The MIT License (MIT)
*
@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"
@alexisakers
alexisakers / SSReadingListItem.swift
Last active May 12, 2016 07:57
An easy and safe way to add URLs to the Safari Reading List on iOS with Swift.
//
// SSReadingListItem.swift
// Created by Alexis Aubry on 09/05/2016.
//
// The MIT License (MIT)
// Copyright (c) 2016 ALEXIS AUBRY
//
import Foundation
import SafariServices