Skip to content

Instantly share code, notes, and snippets.

View phamquyhai's full-sized avatar
🎯
Focusing

Pham Quy Hai phamquyhai

🎯
Focusing
View GitHub Profile
[
{
"purchase" : {
"autoRenewing" : true,
"orderId" : "asdfdg345353463rft345435", // hash unique
"packageName" : "com.example.abc",
"productId" : "book.abc.sub6month",
"purchaseTime" : 78354763544, //The time the product was purchased, in milliseconds since the epoch (Jan 1, 1970).
"purchaseState" : 0, //The purchase state of the order. Possible values are 0 (purchased), 1 (canceled), or 2 (refunded).
"developerPayload" : "34rsfdt3344asdsd...", // Auto create in Android Client
@phamquyhai
phamquyhai / config.js
Last active April 27, 2017 05:34
FDeploy Database
{
filename : "${project.name}-${version.detail.versionName}-${version.createdAt}.apk",
filelocation : "${project._id}/${version._id}.apk"
icon : "${project._id}/icon.png"
}
package asia.fivejuly.chatwork;
import android.accessibilityservice.AccessibilityService;
import android.os.Bundle;
import android.support.v4.view.accessibility.AccessibilityEventCompat;
import android.support.v4.view.accessibility.AccessibilityNodeInfoCompat;
import android.support.v4.view.accessibility.AccessibilityRecordCompat;
import android.util.Log;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
@phamquyhai
phamquyhai / Retrofit-trust-ssl.java
Last active December 5, 2016 02:23
Retrofit Trusting SSL with Certificate Pinner
# How to create Pin ?
# Using OpenSSL
# Example with api github
# Open terminal
# openssl s_client -connect api.github.com:443 | openssl x509 -pubkey -noout | openssl rsa -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64
# Get a key
CertificatePinner certificatePinner = new CertificatePinner.Builder()
@phamquyhai
phamquyhai / returnok.json
Last active August 29, 2015 14:13
when successful
{
"success" : true,
"data":{
}
}
@phamquyhai
phamquyhai / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console