Skip to content

Instantly share code, notes, and snippets.

View thedoritos's full-sized avatar
🎮
OW2

thedoritos thedoritos

🎮
OW2
View GitHub Profile
@thedoritos
thedoritos / launch.sh
Last active April 28, 2021 11:45
URL Scheme Testing Template
#!/bin/bash
STATIC_PAGE_URL=$1
mkdir -p public
if [[ ! -f public/index.html ]]; then curl $STATIC_PAGE_URL > public/index.html; fi
ruby -run -e httpd ./public -p 8000
@thedoritos
thedoritos / SelectingImageEffects
Created June 2, 2015 02:29
Selecting Image Effects written in JS from C#
[RequireComponent(typeof(Camera))]
public class CameraEffectSwitcher : MonoBehaviour
{
Dictionary<CameraEffectType, MonoBehaviour> cameraEffectComponents = new Dictionary<CameraEffectType, MonoBehaviour>();
void Awake()
{
var components = GetComponents<Component>().Where(c => {
return c.GetType().ToString().Equals("ColorCorrectionCurves");
}).Select(c => {
return c as MonoBehaviour;
@thedoritos
thedoritos / UITableView+StrongScroll.h
Created May 3, 2015 14:06
UITableView with strong scroll
//
// UITableView+StrongScroll.h
//
// Created by thedoritos.
// Prevents the scroll on table view from being stolen
// by UIButtons on UITableViewCells.
//
#import <UIKit/UIKit.h>
@thedoritos
thedoritos / Unity-iPhoneWorkspaceBuilder
Created January 27, 2015 06:10
Build ipa from Unity Project
WORKSPACE=/Path/To/Your/Unity/Project
PROJECT_NAME=YourUnityProjectName
# suppose Builder.cs has BuildXcodeProject method
/Applications/Unity/Unity.app/Contents/MacOS/Unity -projectPath $WORKSPACE -quit -batchmode -executeMethod Builder.BuildXcodeProject
XCODE_WORKSPACE_CONFIG_PATH=$PROJECT_NAME/Unity-iPhone.xcworkspace
SCHEME=Unity-iPhone
CONFIGURATION=Release
@thedoritos
thedoritos / Unity-iPhonePodfile
Created January 27, 2015 04:07
Override Xcode Build Settings on Podfile for Unity-iPhone
target 'Unity-iPhone' do
end
target 'Unity-iPhone Tests' do
end
pre_install do |installer|
XCODE_PROJECT_PATH = './Unity-iPhone.xcodeproj'
@thedoritos
thedoritos / LitJsonMapperPrivateInvasion
Created November 26, 2014 14:21
LitJson.JsonMapper mod to set values on private members with JsonMapper.ToObject<T>
namespace LitJson
{
// ...
public class JsonMapper
{
// ..
private static void AddObjectMetadata (Type type)
{
@thedoritos
thedoritos / UnitTestWithClassExtendsMonoBehaviour
Last active January 26, 2016 11:46
Unit Test with a class extends MonoBehaviour
using System;
using System.Collections.Generic;
using System.Threading;
using NUnit.Framework;
using UnityEngine;
namespace UnityTest
{
internal class Subject : MonoBehaviour
{