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
#include "SimpleCommand.h" | |
USING_NS_CC; | |
using namespace std; | |
Scene* SimpleCommand::scene () { | |
Scene *scene = Scene::create(); | |
scene->addChild(SimpleCommand::create()); | |
return scene; | |
} |
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 -x ## or just ` curl -Ls http://git.io/vRozn | sh `. | |
## Downloads the Mac OS X 10.10 Recovery Partition update, | |
## Copy's over the 10.10 version of Disk Utility.app, then | |
## use git to apply a binary patch so it will run on 10.11+. | |
cd /tmp | |
rm -rf DU1010 | |
mkdir DU1010 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<color name="red_50">#fde0dc</color> | |
<color name="red_100">#f9bdbb</color> | |
<color name="red_200">#f69988</color> | |
<color name="red_300">#f36c60</color> | |
<color name="red_400">#e84e40</color> | |
<color name="red_500">#e51c23</color> | |
<color name="red_600">#dd191d</color> | |
<color name="red_700">#d01716</color> |
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
--[[ socketlanes.lua | |
Multi-threaded LuaSocket with Lua Lanes example | |
=============================================== | |
Depends on the following LuaSocket 2.0.2 patch: | |
http://www.net-core.org/dl/luasocket-2.0.2-acceptfd.patch | |
(via http://www.net-core.org/39/lua/patching-luasocket-to-make-it-compatible) | |
(provided at end of file) | |
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 bash | |
if [[ ! ( # any of the following are not true | |
# 1st arg is an existing regular file | |
-f "$1" && | |
# ...and it has a .ipa extension | |
"${1##*.}" == "ipa" && | |
# 2nd arg is an existing regular file | |
-f "$2" && | |
# ...and it has an .mobileprovision extension |
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
typedef struct FontHeader { | |
int32_t fVersion; | |
uint16_t fNumTables; | |
uint16_t fSearchRange; | |
uint16_t fEntrySelector; | |
uint16_t fRangeShift; | |
}FontHeader; | |
typedef struct TableEntry { | |
uint32_t fTag; |
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
// List all fonts on iPhone | |
NSArray *familyNames = [[NSArray alloc] initWithArray:[UIFont familyNames]]; | |
NSArray *fontNames; | |
NSInteger indFamily, indFont; | |
for (indFamily=0; indFamily<[familyNames count]; ++indFamily) | |
{ | |
NSLog(@"Family name: %@", [familyNames objectAtIndex:indFamily]); | |
fontNames = [[NSArray alloc] initWithArray: | |
[UIFont fontNamesForFamilyName: | |
[familyNames objectAtIndex:indFamily]]]; |