Skip to content

Instantly share code, notes, and snippets.

View allfake's full-sized avatar

nut allfake

  • opendream
View GitHub Profile
https://lemmasoft.renai.us/forums/viewtopic.php?f=68&t=27151
http://blog.mb.cloud.nifty.com/?p=1857
@allfake
allfake / unity ios chage build setting
Last active February 3, 2016 06:36
Enable all transport (NSAllowsArbitraryLoads: true) , disable bitcode (ENABLE_BITCODE: false)
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using System.Collections;
using UnityEditor.iOS.Xcode;
using System.IO;
public class ChangeIOSBuild {
[PostProcessBuild]
Update from poompnw
iOS Reference
Icon app 1024x1024
72 dpi, RGB, flattened, no transparency, no rounded corners
Screenshot (Portrait)
- 3.5 inch (iPhone 4s) : 640 x 960 pixels
- 4 inch (iPhone SE) : 640 x 1136 pixels
- 4.7 inch (iPhone 6, iPhone 6s, iPhone 7, iPhone 8) : 750 x 1334 pixels
@allfake
allfake / FadeInOut.cs
Created August 4, 2015 11:10
From http://answers.unity3d.com/questions/119918/transitions-between-changing-scenes.html change to only fade, add hook function, you need to add image in gameObject.
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;
using System.Reflection;
using System;
public class FadeInOut : MonoBehaviour {
[Serializable]
@allfake
allfake / Character set (10)
Last active September 27, 2017 04:46
Character set (thai, english, indonesia)
0-255,688-767,3584-3711,7104-7167,8192-8304
@allfake
allfake / showPolygon2Dcollider.cs
Last active December 30, 2023 19:02 — forked from adekbadek/showedgecollider.cs
Show 2D Polygon Collider as Gizmo, also in Edit Mode (Not support rotation)
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[ExecuteInEditMode]
public class VisibleCollider : MonoBehaviour {
public bool showLine = true;
public Color lineColor = Color.blue;
@allfake
allfake / Ready to use fixed rotated image
Last active August 29, 2015 14:14
Ready to use fixed rotated image
ALAssetRepresentation *assetRepresentation = [asset defaultRepresentation];
CGImageRef fullResImage = [assetRepresentation fullResolutionImage];
NSString *adjustment = [[assetRepresentation metadata] objectForKey:@"AdjustmentXMP"];
if (adjustment) {
NSData *xmpData = [adjustment dataUsingEncoding:NSUTF8StringEncoding];
CIImage *image = [CIImage imageWithCGImage:fullResImage];
NSError *error = nil;
NSArray *filterArray = [CIFilter filterArrayFromSerializedXMP:xmpData
inputImageExtent:image.extent
/*
Simple example for receiving
http://code.google.com/p/rc-switch/
Need help? http://forum.ardumote.com
*/
#include <RCSwitch.h>
@allfake
allfake / gist:8297899
Last active January 2, 2016 11:39
load cell
int minVal = -999;
int threshold = 20;
int calibrate = 300;
int val = 0;
void setup()
{
Serial.begin(9600);
}
@allfake
allfake / ddd
Created November 20, 2013 17:46
// Control an 8x8 LED display with 2 x 74HC595 shift registers
// Using only 3 pins from the Arduino
// shift register = 8 pin
#define DEVICES 6
#define SHIFT_REGISTER 8
#define ALLFPIN SHIFT_REGISTER * DEVICES
// while condition variable
int whileVar = 0;