Skip to content

Instantly share code, notes, and snippets.

SeanZoR /
Created Feb 20, 2020
Android's react-native-webview that doesn't flood the accessibility/UIAutomator2/Appium
* If the WebView is causing constant refreshes to UI, and Appium/UIAutomator2 chokes on it,
* Use this. (To be given as a constructor argument to {@link RNCWebViewManager}.)
public class WebViewAccessibilityIgnore implements WebViewConfig {
void configWebView(WebView webView){
View gist:f34a0893388438d823e40a068a2a6370
* Wrapper for instabug implementation
* API docs are (mostly) here:
public class InstabugUtil {
public static void init(Application context) {
// Builder should run first
Instabug.Builder builder = new Instabug.Builder(context, context.getString(R.string.instabug_key));
if (BuildConfig.DEBUG) {
SeanZoR / gradle-print-tasks-time.gradle
Last active Jul 6, 2016
Android Gradle Tasks Timing
View gradle-print-tasks-time.gradle
// Log timings per task.
class TimingsListener implements TaskExecutionListener, BuildListener {
private Clock clock
private timings = []
void beforeExecute(Task task) {
clock = new org.gradle.util.Clock()
SeanZoR / Mac Github SSH
Last active Sep 19, 2017
Mac + Github = SSH
View Mac Github SSH

Generate the key with no password (just click enter) ssh-keygen -t rsa -b 4096 -C ""
Copy to clipboard pbcopy < ~/.ssh/
Paste the key to your github account
Allow access ssh -T, say yes

SeanZoR /
Last active Sep 30, 2018
Full Stack AngularJS MEAN Installation (OS X, El Capitan)
# Make sure homebrew is installed and latest
brew update
# Run the brew doctor and read the instructions, it will make sure all paths are ready for write and all
brew doctor
# Start installing packages
brew install mongodb
brew install homebrew/versions/node010 #For Yeomen compatability later on
npm install express -g
SeanZoR / detectWebGL.js
Created Aug 20, 2015
Detect WebGL with JS in browser
View detectWebGL.js
* Detects if WebGL is enabled.
* Inspired from
* @return { number } -1 for not Supported,
* 0 for disabled
* 1 for enabled
function detectWebGL()
SeanZoR / build.gradle
Created Jun 17, 2015
Adding a top level build.gradle file
View build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
dependencies {
classpath ''
// NOTE: Do not place your application dependencies here; they belong
View build.gradle
// This hack works with, won't work in later version without modification
apply plugin: 'android'
targetCompatibility = 1.6
sourceCompatibility = 1.6
android {
target = 'android-14'
SeanZoR / gist:068f19545e51e4627749
Created Oct 19, 2014
Android L - fixing "IllegalArgumentException: Service Intent must be explicit"
View gist:068f19545e51e4627749
* Android L (lollipop, API 21) introduced a new problem when trying to invoke implicit intent,
* "java.lang.IllegalArgumentException: Service Intent must be explicit"
* If you are using an implicit intent, and know only 1 target would answer this intent,
* This method will help you turn the implicit intent into the explicit form.
* Inspired from SO answer:
* @param context
* @param implicitIntent - The original implicit intent
SeanZoR / build.gradle
Created Sep 7, 2014
Android - add version name to APK file name
View build.gradle
// Add the version name to the build
applicationVariants.all { v ->
def f = v.outputFile
def fname =".apk",
v.outputFile = new File(f.parent, fname)