Skip to content

Instantly share code, notes, and snippets.

View rafaelwkerr's full-sized avatar
😃
Learning Functional Programming

Rafael Kerr rafaelwkerr

😃
Learning Functional Programming
  • Rio de Janeiro
View GitHub Profile
package utils;
import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
public class RootUtil {
public static boolean isDeviceRooted() {
return checkRootMethod1() || checkRootMethod2() || checkRootMethod3() || checkRootMethod4();
}
@rafaelwkerr
rafaelwkerr / Verify If Main Thread (Android))
Last active August 29, 2015 14:22
Verify If Main Thread (Android)
public boolean isOnMainThread(){
boolean isOnMainThread = (Looper.myLooper() == Looper.getMainLooper());
return isOnMainThread;
}
@rafaelwkerr
rafaelwkerr / Run on UI Thread (Android)
Created June 5, 2015 19:02
Run on UI Thread (Android)
activity.runOnUiThread(new Runnable() {
public void run() {
... do your GUI stuff
}
});
# On build host (has internet access): Download and install NodeJS and NPM
wget http://nodejs.org/dist/node-v0.4.10.tar.gz
tar xvzf node-v0.4.10.tar.gz
cd node-v0.4.11
./configure
make
sudo make install
wget http://npmjs.org/install.sh
sudo sh ./install.sh
package br.com.jinkings.soluciona.application.ui.customview;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.Canvas;
import android.os.Build;
import android.util.AttributeSet;
import android.view.View;
@rafaelwkerr
rafaelwkerr / gist:8002c72636e969b71a4b
Last active April 24, 2016 05:29
Config ANDROID_HOME - Mac OS
export ANDROID_HOME=/Users/admin/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
tools:$ANDROID_HOME/tools:$PATH
@rafaelwkerr
rafaelwkerr / gist:584ecb8e162e485e8bd1
Created December 1, 2015 15:40
Dockerfile Sonarqube M4U Android
FROM java:openjdk-8u45-jdk
MAINTAINER Rafael Kerr <[email protected]>
ENV SONARQUBE_HOME /opt/sonarqube
# Http port
EXPOSE 9000
# Database configuration
#!/bin/bash
set -e
if [ "${1:0:1}" != '-' ]; then
exec "$@"
fi
exec java -jar lib/sonar-application-$SONAR_VERSION.jar \
-Dsonar.log.console=true \
-Dsonar.jdbc.username="sonar" \
@rafaelwkerr
rafaelwkerr / gist:d865b9de91adb6826d9e
Last active January 21, 2016 16:46
Android - The Best....
Awesome Android 1
https://github.com/snowdream/awesome-android
Awesome Android 2
https://github.com/JStumpp/awesome-android
Awesome Android Performance
https://github.com/Juude/awesome-android-performance
@rafaelwkerr
rafaelwkerr / genymotionwithplay.txt
Created January 28, 2016 16:14 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
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)