Skip to content

Instantly share code, notes, and snippets.

@felippewick
felippewick / withReanimatedUseFrameworks.js
Created November 21, 2023 19:57
expo plugin: shared element transition & @react-native-firebase
const plugins = require('expo/config-plugins')
const {
mergeContents,
} = require('@expo/config-plugins/build/utils/generateCode')
const path = require('path')
const fs = require('fs')
module.exports = function withReanimatedUseFrameworks(config) {
return plugins.withDangerousMod(config, [
const { withDangerousMod, withPlugins } = require("@expo/config-plugins");
const {
mergeContents,
} = require("@expo/config-plugins/build/utils/generateCode");
const fs = require("fs");
const path = require("path");
async function readFileAsync(path) {
return fs.promises.readFile(path, "utf8");
}
@jakobo
jakobo / README.md
Last active December 27, 2022 14:18
Podfile Modification for Flipper using @expo/config-plugins

Flipper Config Plugin

This is a companion piece to the article https://blog.expo.dev/developing-react-native-with-expo-and-flipper-8c426bdf995a in case you are running a managed build on EAS.

You'll need to add the expo config plugins to your dependencies: yarn add @expo/config-plugins

⚠️ This uses plugins.withDangerousMod which means you will need to reverify this file with each expo SDK release. This is because we are modifying our Podfile directly and doing so requires certain strings to exist as reference points in the Expo template. That said, the worst that happens is that your app will not include Flipper.

If you'd like to create an /eas directory and put flipper-expo.js there, you can do that and update app.config.json and the require for package.json (Line 9 of flipper-expo.js) accordingly.

How it Works

@Erichain
Erichain / msconvert.js
Last active December 25, 2023 19:15 — forked from remino/msconvert.js
JavaScript: Convert milliseconds to object with days, hours, minutes, and seconds
function convertMS( milliseconds ) {
var day, hour, minute, seconds;
seconds = Math.floor(milliseconds / 1000);
minute = Math.floor(seconds / 60);
seconds = seconds % 60;
hour = Math.floor(minute / 60);
minute = minute % 60;
day = Math.floor(hour / 24);
hour = hour % 24;
return {
@anvaka
anvaka / 00.Intro.md
Last active September 21, 2024 08:49
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score