Skip to content

Instantly share code, notes, and snippets.

@wodin
wodin / AndroidManifest.xml
Last active January 1, 2023 23:37
Allowing an Android app to be moved to an SD card by the user (untested)
<!-- Need to specify the `installLocation`. Can do this with a config plugin -->
<!-- See `app.json` and `withAndroidManifestAttributes.js` below -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myapp"
android:installLocation="auto">
...
</manifest>
@wodin
wodin / eas.json
Created August 12, 2022 08:42
Simple EAS Build config with simulator build profiles
{
"cli": {
"version": ">= 0.52.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"sim-dev": {
@wodin
wodin / app.config.js
Last active August 12, 2023 03:57
Add `usesCleartextTraffic` to AndroidManifest.xml in Expo managed workflow
/*
* Convert `app.json` to `app.config.js`
* Install `@expo/config-plugins` as a devDependency
* Copy the `withAndroidApplicationAttributes` config plugin and related `addAttributesToApplication` function to `app.config.js`
* Add a `plugins` section to reference the config plugin and specify the attribute to add
* Build with `eas build -p android ...`
*/
import { AndroidConfig, withAndroidManifest } from "@expo/config-plugins";
function addAttributesToApplication(androidManifest, attributes) {
@wodin
wodin / BuildSteps.md
Created October 6, 2021 09:52
Building wodin/expo-zip-example
/tmp$ git clone https://github.com/wodin/expo-zip-example
Cloning into 'expo-zip-example'...
remote: Enumerating objects: 38, done.
remote: Counting objects: 100% (38/38), done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 38 (delta 15), reused 38 (delta 15), pack-reused 0
Receiving objects: 100% (38/38), 170.29 KiB | 369.00 KiB/s, done.
Resolving deltas: 100% (15/15), done.
/tmp$ cd expo-zip-example
@wodin
wodin / bcup2bw.py
Last active November 27, 2023 14:33
Migration from Buttercup to Bitwarden
#!/usr/bin/env python3
import sys
import csv
import json
from collections import OrderedDict
# !type
# !group_id
# !group_name
@wodin
wodin / App.js
Last active February 27, 2020 11:40
Expo periodic updates
import React, { useEffect, useState } from "react";
import { View } from "react-native";
import {
Button,
FAB,
Provider as PaperProvider,
Text
} from "react-native-paper";
import { Updates } from "expo";
import { SafeAreaProvider, useSafeArea } from "react-native-safe-area-context";
@wodin
wodin / SketchSystems.spec
Last active February 18, 2020 17:53
# Ignore isMuted, volume, positionMillis, rate, etc. for now
# Ignore isMuted, volume, positionMillis, rate, etc. for now
Audio Player*
Unloaded*
# Call Audio.Sound.createAsync()
# Should start getting status updates
load -> Loading
Loading
# e.g. navigate away, need to clean up
Snapshot
logout -> Login Page
summary -> Summary
Reports*
students -> Students
standards -> Standards
Summary*
Devices
logout -> Not Authenticated
Home*
scan -> Scan Barcode
Scan Barcode
fail -> Scan Barcode
succeed -> Resolving Patient