Skip to content

Instantly share code, notes, and snippets.

View litefeel's full-sized avatar
🎯
I may be slow to respond.

Xiaoqing Zhang litefeel

🎯
I may be slow to respond.
View GitHub Profile
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
apply plugin: 'com.android.application'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// compile sdk
compile project(':sdks:sdk1')
compile project(':sdks:sdk2')
}
android {
# .gitconfig or .git/config
# git proxy via socks5
[http]
proxy = socks5://127.0.0.1:3390
@litefeel
litefeel / AndroidManifast.xml
Created November 26, 2015 05:10
Supporting incoming links to your app
<!-- ATTENTION: This intent was auto-generated. Follow instructions at
https://g.co/AppIndexing/AndroidStudio to publish your Android app deep links. -->
<!-- support multiple inter filter -->
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- http://litefeel.com/myapp/xxxx
visite this link in browse will switch to this application
@litefeel
litefeel / getkeyhash.bat
Created November 26, 2015 08:24
get key hash from keystore file
# get key hash from keystore file
# first
SET KEY_TOOL=%JAVA_HOME%/bin/keytool.exe
SET OPEN_SSL=%openssl%
SET ALIAS=androiddebugkey
SET KEY_STORE="C:/Users/myuser/.android/debug.keystore"
#keytool -exportcert -alias androiddebugkey -keystore "C:/Users/xiaoqing.zhang/.android/debug.keystore" | openssl sha1 -binary |openssl base64
%KEY_TOOL% -exportcert -alias %ALIAS% -keystore %KEY_STORE% | %OPEN_SSL% sha1 -binary | %OPEN_SSL% base64
local a = {}
local Plus = {}
local Base = {}
-- t not self
Plus.__index = function (t, k)
-- output Plus true false false
print("Plus", t == a, t == Plus, t == Base)
return Plus[k]
end
-- t not self
@litefeel
litefeel / utf8.lua
Created February 23, 2016 07:28
utf8len utf8sub
function string.utf8len(s)
if s == nil or s == "" then return 0 end
local n = 0
for i = 1, #s do
local c = string.byte(s, i)
if c < 0x80 or c >= 0xC0 then
n = n + 1
end
end
@litefeel
litefeel / BitmapChar.as
Created March 14, 2016 01:49 — forked from 7interactivestudio/BitmapChar.as
Bitmap Chars for Genome2D Font created with Littera ( http://kvazars.com/littera/ ) GBitmapFont Topic and Demo: http://forum.genome2d.com/viewtopic.php?f=6&t=111
/**
* Created by rodrigo on 12/14/13.
*/
package rodrigolopezpeker.genome2d.text {
import com.genome2d.textures.GTexture;
import flash.utils.Dictionary;
public class BitmapChar {
// CameraFacing.cs
// original by Neil Carter (NCarter)
// modified by Hayden Scott-Baron (Dock) - http://starfruitgames.com
// allows specified orientation axis
using UnityEngine;
using System.Collections;
public class CameraFacing : MonoBehaviour