Skip to content

Instantly share code, notes, and snippets.

View darkdukey's full-sized avatar

Nite Luo darkdukey

View GitHub Profile
@darkdukey
darkdukey / convert.shader
Created July 25, 2019 17:23
Convert ShaderToy to Unity shaders
vec2 float2
vec3 float3
vec4 float4
mat2 float2x2
mat3 float3x3
mat4 float4x4
iGlobalTime _Time.y
iTime _Time.y
mod fmod
mix lerp
@darkdukey
darkdukey / Singleton.cs
Created October 11, 2018 20:46
Unity Singleton
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Samsung
{
public abstract class Singleton<T> : Singleton where T : MonoBehaviour
{
#region Fields
[CanBeNull]
@darkdukey
darkdukey / policy.json
Created September 14, 2016 03:14
S3 Static web hosting policy
{
"Id": "StaticWeb",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1473822775279",
"Action": [
"s3:GetObject"
],
"Effect": "Allow",
@darkdukey
darkdukey / strip.conf
Created January 21, 2016 06:15 — forked from dextorer/strip.conf
google-play-services-strip-script
actions=true
ads=true
analytics=true
appindexing=true
appstate=true
auth=true
cast=true
common=true
drive=false
dynamic=true
@darkdukey
darkdukey / PluginFacebookLuaHelper.cpp
Created October 23, 2015 21:33
SDKBOX facebook lua 1.4
#include "PluginFacebookLuaHelper.h"
#include "PluginFacebook/PluginFacebook.h"
#include "CCLuaEngine.h"
#include "tolua_fix.h"
#include "SDKBoxLuaHelper.h"
static const std::string FBGraphUser_ID ("uid");
static const std::string FBGraphUser_NAME ("name");
static const std::string FBGraphUser_FIRST_NAME ("firstName");
@darkdukey
darkdukey / Cocos2dxGLSurfaceView.java
Created October 7, 2015 00:12
Cocos2d-x BackButton
/****************************************************************************
Copyright (c) 2010-2011 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@darkdukey
darkdukey / build.log
Created September 11, 2015 22:20
libcurl issue
proj.android/../cocos2dx/cocos2dx/platform/third_party/android/prebuilt/libcurl/libs/armeabi-v7a/libcurl.a(libcurl_la-netrc.o):netrc.c:function Curl_parsenetrc: error: undefined reference to 'getpwuid_r'
proj.android/../cocos2dx/cocos2dx/platform/third_party/android/prebuilt/libcurl/libs/armeabi-v7a/libcurl.a(libcurl_la-curl_ntlm_wb.o):curl_ntlm_wb.c:function ntlm_wb_init: error: undefined reference to 'getpwuid_r'
proj.android/../cocos2dx/cocos2dx/platform/third_party/android/prebuilt/libcurl/libs/armeabi-v7a/libcurl.a(libcurl_la-curl_ntlm_wb.o):curl_ntlm_wb.c:function ntlm_wb_init: error: undefined reference to 'getpwuid_r'
proj.android/../cocos2dx/cocos2dx/platform/third_party/android/prebuilt/libpng/libs/armeabi-v7a/libpng.a(pngget.o):pngget.c:function png_get_sCAL_fixed: error: undefined reference to 'atof'
proj.android/../cocos2dx/cocos2dx/platform/third_party/android/prebuilt/libpng/libs/armeabi-v7a/libpng.a(pngget.o):pngget.c:function png_get_sCAL_fixed: error: undefined reference to 'atof'
proj.andro
@darkdukey
darkdukey / Vungle crash
Created September 8, 2015 22:35
SDKBOX Vungle crash
I/DEBUG ( 183): Abort message: 'art/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: JNI GetStringUTFChars called with pending exception 'android.content.res.Resources$NotFoundException' thrown in unknown throw location'
I/DEBUG ( 183): r0 00000000 r1 000055e7 r2 00000006 r3 00000000
I/DEBUG ( 183): r4 aebffdb8 r5 00000006 r6 0000000b r7 0000010c
I/DEBUG ( 183): r8 00000000 r9 b486f520 sl b4a38800 fp 00000001
I/DEBUG ( 183): ip 000055e7 sp aebff260 lr b6e313c5 pc b6e54ea0 cpsr 60070010
I/DEBUG ( 183):
I/DEBUG ( 183): backtrace:
I/DEBUG ( 183): #00 pc 0003aea0 /system/lib/libc.so (tgkill+12)
I/DEBUG ( 183): #01 pc 000173c1 /system/lib/libc.so (pthread_kill+52)
I/DEBUG ( 183): #02 pc 00017fd3 /system/lib/libc.so (raise+10)
@darkdukey
darkdukey / Cocos2dxActivity.java
Created July 14, 2015 01:05
SDKBOX Cocos2dxActivity.java Sample
/****************************************************************************
Copyright (c) 2010-2013 cocos2d-x.org
http://www.cocos2d-x.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@darkdukey
darkdukey / sdkbox_config.json
Last active August 29, 2015 14:23
SDKBox GooglePlay IAP sample
"android" :
{
"iap":
{
"key":"your in-app-billing key here",
"items":{}
}
}