Skip to content

Instantly share code, notes, and snippets.

View ferrannp's full-sized avatar
🏋️‍♂️
At the gym

Ferran Negre ferrannp

🏋️‍♂️
At the gym
View GitHub Profile
// RNSplashScreenModule.java
import android.app.Activity;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.bridge.ReactMethod;
import javax.annotation.Nonnull;
// styles.xml
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimaryDark">@color/primaryDark</item>
<item name="android:windowBackground">@color/background</item>
</style>
// splash_screen.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
android:opacity="opaque">
<item android:drawable="@color/darkBackground" />
<item
android:gravity="center"
android:bottom="72dp">
<bitmap
// styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimaryDark">@color/primaryDark</item>
<item name="android:windowBackground">@color/background</item>
</style>
import fetch from 'node-fetch';
import AdmZip from 'adm-zip';
import zlib from 'zlib';
import fs from 'fs';
import path from 'path';
const username = ''; // Add secret username
const password = ''; // Add secret password
const authHeader = `Basic ${Buffer.from(`${username}:${password}`).toString('base64')}`;