Skip to content

Instantly share code, notes, and snippets.

View hateum's full-sized avatar

Hatem Noureddine hateum

View GitHub Profile
@hateum
hateum / gradle.properties
Created March 1, 2016 14:57 — forked from danielgomezrico/gradle.properties
Android / Gradle - global gradle.properties for fast gradle builds on local machines (NOT in CI).
org.gradle.daemon = true
org.gradle.jvmargs = -Xmx8g -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 -XX:MaxPermSize=4g -Dsun.io.useCanonCaches=false -XX:+DoEscapeAnalysis -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:+UseFastAccessorMethods -XX:+CMSClassUnloadingEnabled -noverify -Xverify:none -XX:+TieredCompilation -da
org.gradle.parallel = true
org.gradle.parallel.threads = 5
org.gradle.configureondemand = true
/*
* Copyright (C) 2011 Micah Hainline
* Copyright (C) 2012 Triposo
* Copyright (C) 2013 Paul Imhoff
* Copyright (C) 2014 Shahin Yousefi
*
* 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
*
// Copyright 2012 Square, Inc.
package com.squareup.widgets;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.ImageView;
/** Maintains an aspect ratio based on either width or height. Disabled by default. */
public class AspectRatioImageView extends ImageView {
import android.net.SSLCertificateSocketFactory;
import android.net.SSLSessionCache;
import android.os.Build;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.params.HttpParams;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.TrustManager;
import java.io.IOException;
// MapAdjust.java
// Based on adjust.py
// Gatubit <[email protected]>
// https://gist.github.com/astrocosa/724526
// Based on adjust.js
// Bratliff <[email protected]>
// http://www.polyarc.us/adjust.js
using UnityEngine;
using System.Collections;
public class NaturalOrientation : MonoBehaviour {
public static int ORIENTATION_UNDEFINED = 0x00000000;
public static int ORIENTATION_PORTRAIT = 0x00000001;
public static int ORIENTATION_LANDSCAPE = 0x00000002;
public static int ROTATION_0 = 0x00000000;
package com.asynctask.util;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import java.io.InterruptedIOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.Callable;
/**
* Dialog fragment helper
*/
public abstract class DialogFragmentHelper extends RoboDialogFragment {
private static final String TAG = "dialog_fragment_helper";
/**
* Show dialog
*/
/*
* Copyright (c) 2013 Alex Curran
*
* 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