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
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
NSArray *fontNames; | |
NSInteger familyIndex, fontIndex; | |
for (familyIndex = 0; familyIndex < [familyNames count]; ++ familyIndex) { | |
NSLog(@"Family name: %@", [familyNames objectAtIndex:familyIndex]); | |
fontNames = [[NSArray alloc] initWithArray:[UIFont fontNamesForFamilyName: | |
[familyNames objectAtIndex:familyIndex]]]; | |
for (fontIndex = 0; fontIndex < [fontNames count]; ++ fontIndex) { | |
NSLog(@" Font name: %@", [fontNames objectAtIndex:fontIndex]); | |
} |
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 | |
simulatorDirectory="$HOME/Library/Developer/CoreSimulator/Devices" | |
latestSimulator=$(ls -Ft "$simulatorDirectory"| grep / | head -1) | |
applicationsDirectory="$simulatorDirectory""/""$latestSimulator/Applications/" | |
latestApp=$(ls -t "$applicationsDirectory" | head -1) | |
appDirectory="$applicationsDirectory""/""$latestApp" | |
libraryDirectory="$appDirectory/Library" | |
prefDir="$libraryDirectory/Preferences" | |
cachesDirectory="$libraryDirectory/Caches" |
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
simulatorDirectory="$HOME/Library/Application Support/iPhone Simulator" | |
latestSimulator=$(ls -t "$simulatorDirectory" | head -1) | |
applicationsDirectory="$simulatorDirectory""/""$latestSimulator/Applications/" | |
latestApp=$(ls -t "$applicationsDirectory" | head -1) | |
appDirectory="$applicationsDirectory""/""$latestApp" | |
open "$appDirectory" |
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/sh | |
# hextorgb.sh | |
hexinput=`echo $1 | tr '[:lower:]' '[:upper:]'` #uppercaseing | |
a=`echo $hexinput | cut -c-2` | |
b=`echo $hexinput | cut -c3-4` | |
c=`echo $hexinput | cut -c5-6` | |
r=`echo "ibase=16; $a" | bc` | |
g=`echo "ibase=16; $b" | bc` | |
b=`echo "ibase=16; $c" | bc` |
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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/3999124/hack.sh | sh | |
# |