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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | |
<html> | |
<!-- | |
Instructions: | |
1. Get UDID of the client device via iTunes. | |
2. Send the device UDID to developer portal. | |
3. Generate a new build with the UDID of the client. | |
4. Archive to enterprise distribribution and save in your machine. | |
5. Change MyApp.plist in this file to your generate plist file, the |
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
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "$INFOPLIST_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
// Check form | |
RACSignal *formValidate = [RACSignal | |
combineLatest:@[self.textField.rac_textSignal] | |
reduce:^(NSString *email) { | |
NSRange at = [email rangeOfString:@"@"]; | |
return @(at.location != NSNotFound); | |
}]; | |
[[formValidate map:^id(NSNumber *isValid) { | |
return isValid; |
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
if (Ti.Platform.osname == 'android') { | |
var filesToDownload = [ | |
{url: "http://site.com/image1.jpg"}, | |
{url: "http://site.com/image2.jpg"}, | |
{url: "http://site.com/image3.jpg"} | |
]; | |
var totalFiles = filesToDownload.length; | |
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
type mogenerator >/dev/null 2>&1 || { | |
echo >&2 "Warning: mogenerator not found. You will need it when changing core data model"; | |
exit 0; | |
} | |
cd "${SOURCE_ROOT}/${PROJECT_NAME}" | |
PATH_TO_MODELD="Resources/Model/${PROJECT_NAME}.xcdatamodeld" | |
CURRENT_MODEL_VERSION=$(/usr/libexec/PlistBuddy -c "Print :_XCCurrentVersionName" "${PATH_TO_MODELD}/.xccurrentversion") | |
MODEL_PATH="${PATH_TO_MODELD}/${CURRENT_MODEL_VERSION}" |
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
/* | |
set the UITextField's and UITextView's delegates to file owners! | |
put at .h file | |
*/ | |
id activeField; |
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
//http://codewars.net/304/layer-clipping-in-cocos2d-x/ | |
void CCClippingLayer::visit() | |
{ | |
// quick return if not visible | |
if (!getIsVisible()) | |
{ | |
return; | |
} |
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/2108403/hack.sh | sh | |
# |
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
moment.lang('en', { | |
months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"), | |
monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"), | |
weekdays : "Domingo_Segunda_Terça_Quarta_Quinta_Sexta_Sábado".split("_"), | |
weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"), | |
longDateFormat : { | |
LT : "h:mm A", | |
L : "MM/DD/YYYY", | |
LL : "MMMM D YYYY", | |
LLL : "MMMM D YYYY LT", |
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
import os, os.path, shutil | |
YUI_COMPRESSOR = 'yuicompressor-2.4.2.jar' | |
#_______________________________________________________________________ | |
def compress(in_files, out_file, in_type='js', verbose=False, temp_file='.temp'): | |
temp = open(temp_file, 'w') |
OlderNewer