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
/** | |
* 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() | |
{ |
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
[ | |
{ | |
"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", |
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
public static String getDeviceUniqueId(Context ctx) { | |
return Settings.Secure.getString(ctx.getContentResolver(), | |
Settings.Secure.ANDROID_ID); | |
} |
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
# Ignoring all of the external "org" libraries | |
# (for example org.apache & org.jackson) | |
-keep class org.** { *; } | |
-dontwarn org.** | |
# Have more? Simply add them like the one above, | |
# and change to the desired package name. |
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
android { | |
defaultConfig { | |
... | |
// Fetch the version according to git latest tag and "how far are we from last tag" | |
def longVersionName = "git -C ${rootDir} describe --tags --long".execute().text.trim() | |
def (fullVersionTag, versionBuild, gitSha) = longVersionName.tokenize('-') | |
def(versionMajor, versionMinor, versionPatch) = fullVersionTag.tokenize('.') | |
// Set the version name | |
versionName "$versionMajor.$versionMinor.$versionPatch($versionBuild)" |
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
/** | |
* 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); | |
} |
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
/** | |
* This method helps getting the right langauage ISO code, which suppose to be | |
* according to ISO-639-1, BUT, on some devices it still returns the deprecated ISO-639. | |
* <BR> | |
* Languages codes that are translated in this method: | |
* <ul> | |
* <li>Hebrew: IW -> HE | |
* <li>Indonesian: IN -> ID | |
* <li>Yiddish: JI -> YI | |
* </ul> |
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
public static int getVersionCode(Context ctx) { | |
int versionCode = 0; | |
try { | |
PackageInfo pInfo = ctx.getPackageManager().getPackageInfo( | |
ctx.getPackageName(), 0); | |
versionCode = pInfo.versionCode; | |
} catch (PackageManager.NameNotFoundException e) { | |
e.printStackTrace(); | |
} |
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 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 |
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
/*** | |
* 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) { |
NewerOlder