This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# | |
# Convenience wrapper around the simctl command to perform operations related to iOS simulators. | |
# Author: Justin Williams (@justin) | |
# | |
# Usage: sim <options> <subcommand> | |
# | |
# This script is designed to work with ZSH. ymmv with other shells. | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// doesn't work, as there's a bug with displaying some emoji in a smaller font on the same line | |
class func adjustEmojiFont(emojiFont: UIFont, regularFont: UIFont, forText text: String) -> NSMutableAttributedString { | |
let emojiCharacterSet = NSCharacterSet.emojiCharacterSet | |
let scanner = NSScanner(string: text) | |
let attributed = NSMutableAttributedString() | |
var words: NSString? = nil | |
var emoji: NSString? = nil | |
// in case the string starts with emoji |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image.frame.origin.y = | |
(container.frame.size.height - image.frame.size.height)/2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# More information at http://0xced.blogspot.com/2010/07/using-sdk-313-with-iphone-sdk-4.html | |
IPHONE_SDK_DMG="$HOME/Downloads/iphone_sdk_3.1.3_with_xcode_3.2.1__snow_leopard__10m2003a.dmg" | |
DEVELOPER_DIR="/Developer" | |
MOUNT_POINT="/Volumes/iPhone SDK" | |
function cleanup | |
{ | |
echo "" |