Skip to content

Instantly share code, notes, and snippets.

View tmdroid's full-sized avatar

Daniel Bejan tmdroid

View GitHub Profile
@wickdninja
wickdninja / http.js
Last active February 6, 2019 10:16
jQuery HTTP json service with promises
var Http = (function ($, storage, self) {
var _contentType = 'application/json; charset=utf-8',
_dataType = 'json',
_key = 'token';
function getToken() {
return storage.getItem(_key);
}
function setAuthHeader(xhr) {
@ibnux
ibnux / KeyPinStore.java
Created March 4, 2017 15:49
SSL Pinning Android using CloudFLare SSL
package your.package;
import android.content.Context;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.KeyManagementException;