This file contains hidden or 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
{ | |
"i386": "Simulator", | |
"x86_64": "Simulator", | |
"iPad1,1": "iPad", | |
"iPad2,1": "iPad 2", | |
"iPad2,2": "iPad 2", | |
"iPad2,3": "iPad 2", | |
"iPad2,4": "iPad 2", | |
"iPad3,1": "iPad (3rd generation)", | |
"iPad3,2": "iPad (3rd generation)", |
This file contains hidden or 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 | |
TARGET="/Volumes/sandbox.app" | |
APP_ID="app.bundle.id" | |
if [ -d $TARGET ]; then | |
sudo umount $TARGET | |
fi | |
sudo mkdir $TARGET |
This file contains hidden or 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/sh | |
# Remove an object from a static library. | |
LIB_SRC=${1} | |
OBJ=${2} | |
if [ -z ${OBJ} ]; then |
This file contains hidden or 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 | |
# Add this script to your Scheme->Build->Post Actions | |
ASSETS_PATH=${CODESIGNING_FOLDER_PATH}/Assets.car | |
xcrun --sdk ${PLATFORM_NAME} assetutil --info ${ASSETS_PATH} | grep -q "DisplayGamut.*P3" | |
if [ $? -eq 0 ]; then | |
osascript -e 'tell app "System Events" to display dialog "Some images are in Display P3 gamut, which is not supported in iOS 9.0~9.2"' | |
# xcrun --sdk ${PLATFORM_NAME} assetutil --info ${ASSETS_PATH} > /tmp/assets.json |
This file contains hidden or 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
import GCDWebServer | |
class CorsProxy { | |
init(webserver : GCDWebServer!, urlPrefix: String) { | |
var prefix = | |
(urlPrefix.hasPrefix("/") ? "" : "/") | |
+ urlPrefix | |
+ (urlPrefix.hasSuffix("/") ? "" : "/") | |
let pattern = "^" + NSRegularExpression.escapedPatternForString(prefix) + ".*" |
This file contains hidden or 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 | |
DERIVED_DATA=~/Library/Developer/Xcode/DerivedData | |
# Kill Xcode | |
echo "💥 Killing Xcode ..." | |
kill $(ps aux | grep 'Xcode' | awk '{print $2}') 2>/dev/null | |
# Remove xcuserdata | |
for f in `ls -t $DERIVED_DATA`; do |
This file contains hidden or 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 python | |
#-*- coding: utf-8 -*- | |
import re | |
from distutils.version import LooseVersion | |
_POD_RE = re.compile(r'\s{1,1}- (.*) \((.*)\)') | |
def parse_lock_file(lock): | |
pods = {} |
This file contains hidden or 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
import Darwin | |
let handle = dlopen("/usr/lib/libc.dylib", RTLD_NOW) | |
let sym = dlsym(handle, "random") | |
let functionPointer = UnsafeMutablePointer<() -> CLong>(sym) | |
let result = functionPointer.memory() | |
println(result) |
This file contains hidden or 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 | |
# Usage: ./icon.sh icon.png | |
icon=$1 | |
icon_name=${icon%.*} | |
icon_dir=${icon}.iconset | |
icon_tmp_path=/tmp/${icon_dir} |
This file contains hidden or 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 | |
find ./ -name "*.a" | xargs nm -gU | sed -n -e 's/.*_OBJC_CLASS_$_\(.*\)/\1/p' |
NewerOlder