Skip to content

Instantly share code, notes, and snippets.

[
{
"collection_addr": "terra103z9cnqm8psy0nyxqtugg6m7xnwvlkqdzm4s4k",
"created_at": "2021-10-02 16:11:27+00:00",
"description": "Galactic Punks are 10,921 randomly generated NFTs on the Terra blockchain.",
"in_settlement": true,
"kind": "image",
"name": "Galactic Punk #9085",
"price": 65000000,
"slug": "terra103z9cnqm8psy0nyxqtugg6m7xnwvlkqdzm4s4k_322419286319563754354739883815582226965",
@SeanZoR
SeanZoR / WebViewAccessibilityIgnore.java
Created February 20, 2020 12:48
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 {
@Override
void configWebView(WebView webView){
webView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
}
/***
* Wrapper for instabug implementation
* API docs are (mostly) here: https://instabug.com/public/android-api-reference/com/instabug/library/Instabug.html
*/
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
SeanZoR / gradle-print-tasks-time.gradle
Last active July 6, 2016 06:54
Android Gradle Tasks Timing
// Log timings per task.
class TimingsListener implements TaskExecutionListener, BuildListener {
private Clock clock
private timings = []
@Override
void beforeExecute(Task task) {
clock = new org.gradle.util.Clock()
}
@SeanZoR
SeanZoR / Mac Github SSH Quick.md
Last active September 19, 2017 09:18
Mac + Github = SSH

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

@SeanZoR
SeanZoR / InstallFullStackAngularJsMean.sh
Last active September 30, 2018 22:14
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
SeanZoR / detectWebGL.js
Created August 20, 2015 12:48
Detect WebGL with JS in browser
/**
* Detects if WebGL is enabled.
* Inspired from http://www.browserleaks.com/webgl#howto-detect-webgl
*
* @return { number } -1 for not Supported,
* 0 for disabled
* 1 for enabled
*/
function detectWebGL()
{
@SeanZoR
SeanZoR / build.gradle
Created June 17, 2015 14:28
Adding a top level build.gradle file
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
// NOTE: Do not place your application dependencies here; they belong
@SeanZoR
SeanZoR / build.gradle
Last active April 11, 2016 05:49 — forked from khernyo/build.gradle
// This hack works with com.android.tools.build:gradle:0.2, won't work in later version without modification
apply plugin: 'android'
targetCompatibility = 1.6
sourceCompatibility = 1.6
android {
target = 'android-14'
@SeanZoR
SeanZoR / gist:068f19545e51e4627749
Created October 19, 2014 19:00
Android L - fixing "IllegalArgumentException: Service Intent must be explicit"
/***
* 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: http://stackoverflow.com/a/26318757/1446466
* @param context
* @param implicitIntent - The original implicit intent