This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void trustEveryone() { | |
try { | |
SSLContext context = SSLContext.getInstance("TLS"); | |
context.init(null, new X509TrustManager[]{new X509TrustManager() { | |
public void checkClientTrusted(X509Certificate[] chain, | |
String authType) throws CertificateException { | |
} | |
public void checkServerTrusted(X509Certificate[] chain, | |
String authType) throws CertificateException { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make a fresh clone of YOUR_REPO | |
git clone YOUR_REPO | |
cd YOUR_REPO | |
# Create tracking branches of all branches | |
for remote in `git branch -r | grep -v /HEAD`; do git checkout --track $remote ; done | |
# Remove DIRECTORY_NAME from all commits, then remove the refs to the old commits | |
# (repeat these two commands for as many directories that you want to remove) | |
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch DIRECTORY_NAME/' --prune-empty --tag-name-filter cat -- --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@file:JvmName("Log") | |
package .... | |
import java.text.SimpleDateFormat | |
import java.util.* | |
const val TAG = "TAG" | |
const val FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ" | |
private var enabled = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MemoizationSingleTransformer<T : Expirable>(val expiration: Long) : SingleTransformer<T, | |
T> { | |
private val TAG: String? = MemoizationSingleTransformer::class.simpleName; | |
var value: T? = null | |
override fun apply(upstream: Single<T>): SingleSource<T>? { | |
val memory = Single.fromCallable { | |
value ?: Expirable().expire() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.netflix.experiments.rx; | |
import java.util.HashMap; | |
import java.util.Map; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import rx.Observable; | |
import rx.Observable.OnSubscribe; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
import os | |
import socket | |
import ssl | |
import select | |
import httplib | |
import urlparse | |
import threading | |
import gzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.pdi.mca.go; | |
import android.content.Context; | |
import android.content.ContextWrapper; | |
import android.content.res.AssetManager; | |
import android.content.res.Configuration; | |
import android.content.res.Resources; | |
import android.support.annotation.NonNull; | |
import android.util.DisplayMetrics; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2015 Jake Wharton | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
a=<ProtectionHeader...> | |
b=a.decode("base64") | |
b | |
#Remove 10 first bytes related to size, etc | |
c=b[10:] | |
c | |
#decode as utf-16 | |
d=c.decode("utf-16") | |
d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |
NewerOlder