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
<key>CFBundleDocumentTypes</key> | |
<array> | |
<dict> | |
<key>CFBundleTypeName</key> | |
<string>All Files</string> | |
<key>LSItemContentTypes</key> | |
<array> | |
<string>public.data</string> | |
<string>public.content</string> | |
</array> |
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
de_CH: "CHF" (should be "Fr.") | |
fr_CH: "CHF" (should be "fr.") | |
it_CH: "CHF" (should be "fr.") | |
rm_CH: "CHF" (should be "fr.") | |
international: "USD" (should be "CHF") |
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 "AFRestClient+OAuth.h" | |
NSString * const kAFOAuthBasicGrantType = @"user_basic"; | |
NSString * const kAFOauthRefreshGrantType = @"refresh_token"; | |
@implementation AFRestClient (OAuth) | |
- (void)authenticateUsingOAuthWithPath:(NSString *)path | |
username:(NSString *)username | |
password:(NSString *)password |
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 | |
# makeuniversalstaticlib.sh | |
# SAMPLELib | |
# | |
#################[ Tests: helps workaround any future bugs in Xcode ]######## | |
DEBUG_THIS_SCRIPT="false" |
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
#Xcode target has sub-targets of the resources bundle target, and the target that makes a universal version of the static library for the current build config). | |
#this is the Run Script build phase that happens after that. | |
echo "" | |
echo "moving resources bundle into universal build folder" | |
echo "" | |
if [ ${ACTION} = "build" ] | |
then | |
echo "Copying resources into ${BUILD_DIR}/${CONFIGURATION}-universal/ ..." |
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 <Foundation/Foundation.h> | |
int main (int argc, const char * argv[]) | |
{ | |
#define kItemKey @"kItemKey" | |
#define kPriceKey @"kPriceKey" | |
@autoreleasepool { | |
// insert code here... |
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
#ifndef H_UTF8_MAPPED_UTF16_STRING_H_ | |
#define H_UTF8_MAPPED_UTF16_STRING_H_ | |
#import <Foundation/Foundation.h> | |
#import <string> | |
/* | |
* Convert a UTF-16 string to UTF-8, mapping indices to provide low-complexity | |
* range and index lookups. | |
* |
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
class PostsController < ActionController::Base | |
def create | |
Post.create(post_params) | |
end | |
def update | |
Post.find(params[:id]).update_attributes!(post_params) | |
end | |
private |
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
Dynamic drawing to a texture in Unity3d basic. This is not complete working code but pieces cut out of working code so you'll have to look up the documentation for the functions called to get specific parameters and such. | |
static function CreateFooTexture ( ... ) | |
{ | |
// create texture: | |
var tex : Texture2D = new Texture2D(512, 512, TextureFormat.ARGB32, false); | |
// get the pixels |
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
// | |
// NSObject+RFExtensions.h | |
// | |
// Created by brandon on 10/5/12. | |
// Copyright (c) 2012 redf.net. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
typedef void (^NSObjectPerformBlock)(id userObject); |