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
class AllKnowingString { } // Nothing but a placeholder, afterall it's all values of strings at all times so it needs no values. | |
func ==(lhs: AllKnowingString, rhs: String) -> Bool { | |
return true | |
} | |
func ==(lhs: String, rhs: AllKnowingString) -> Bool { | |
return true | |
} |
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
This is an issue that I myself have been receiving as well. The system log reports the app suffered from a "stack overflow" and this is the full crash report: | |
Incident Identifier: 9257266D-D764-463A-AB0B-43425E58C276 | |
Hardware Model: iPhone6,1 | |
Process: [Application Name] [996] | |
Version: 37 (1.0) | |
Code Type: ARM-64 (Native) | |
Parent Process: launchd [1] | |
Date/Time: 2014-09-02 15:52:48.058 -0500 |
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
# Load ActiveRecord tasks | |
include ActiveRecord::Tasks | |
DatabaseTasks.database_configuration = YAML.load(File.open(Laeron.root.join("config", "database.yml"))) | |
DatabaseTasks.db_dir = "db" | |
DatabaseTasks.migrations_paths = "db" | |
ActiveRecord::Base.configurations = DatabaseTasks.database_configuration | |
ActiveRecord::Base.establish_connection(Laeron.env) |
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
# Add your own tasks in files placed in lib/tasks ending in .rake, | |
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | |
require File.expand_path('../config/application', __FILE__) | |
Rails.application.load_tasks |
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
var ua = navigator.userAgent.toLowerCase(), | |
isPhone = /iphone|android/i.test(ua), | |
isTablet = /ipad|android/i.test(ua), | |
isiOS = /iphone|ipod|ipad/i.test(ua), | |
isAndroid = /android/i.test(ua); |
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 "ABRecordRefWrapper.h" | |
@interface ABRecordRefWrapper () | |
@property (nonatomic) ABRecordRef person; | |
@property (strong, nonatomic) NSArray *numbersCache; | |
@property (strong, nonatomic) NSString *firstNameCache; | |
@property (strong, nonatomic) NSString *lastNameCache; |
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
CFLAGS=-Wall | |
CC=cc | |
all: arr_test | |
arr_test: array.c main.c | |
$(CC) $(CFLAGS) array.c main.c -o arr_test | |
clean: | |
rm -f arr_test |
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
# Open SQLiteMan on the iOS simulator SQL DB | |
function ios_sql { | |
local IOS_VERSION; | |
local SQLITE; | |
DEFAULT_IOS_VERSION="7.0.3" | |
IOS_VERSION=${1:-$DEFAULT_IOS_VERSION} | |
echo $IOS_VERSION | |
SQLITE=$(find ~/Library/Application\ Support/iPhone\ Simulator/$IOS_VERSION -regex ".*\.sqlite" | head -1) |
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
+ (NSString *)signString:(NSString *)paramString { | |
NSData *paramData = [paramString dataUsingEncoding:NSUTF8StringEncoding]; | |
NSData *secretData = [kMessagePetzAPISecret dataUsingEncoding:NSUTF8StringEncoding]; | |
NSMutableData *sigData = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH]; | |
CCHmac(kCCHmacAlgSHA256, secretData.bytes, secretData.length, paramData.bytes, paramData.length, sigData.mutableBytes); | |
return [sigData hexadecimalString]; | |
} |
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
using UnityEngine; | |
public static class Physics2DExtensions { | |
public static void AddForce(this Rigidbody2D rigidbody2D, Vector2 force, ForceMode mode = ForceMode.Force) { | |
switch (mode) { | |
case ForceMode.Force: | |
rigidbody2D.AddForce(force); | |
break; | |
case ForceMode.Impulse: | |
rigidbody2D.AddForce(force / Time.fixedDeltaTime); |