Skip to content

Instantly share code, notes, and snippets.

View mrousavy's full-sized avatar
🐍
slime season

Marc Rousavy mrousavy

🐍
slime season
View GitHub Profile
@mrousavy
mrousavy / Hermes-build-commands.sh
Last active February 15, 2025 19:22
Static Hermes benchmark
# 1. Build Hermes off of static_h branch.
# 2. Run these commands:
# Static Hermes
build/bin/shermes -strict -parse-ts -finline -O -typed main.ts
./a.out
# BENCHMARK: 50000 iterations took 12818.000ms
# Hermes
build/bin/hermes -O -finline -parse-ts main.ts
@mrousavy
mrousavy / withNoBundleCompression.js
Created February 15, 2025 18:15
Expo Config Plugin to disable JS bundle compression for faster app startup
const {withAppBuildGradle} = require('@expo/config-plugins')
/**
* A Config Plugin to disable bundle compression in Android build.gradle.
* This makes the Android app start faster - in our tests by 400ms!
* @param {import('@expo/config-plugins').ConfigPlugin} config
* @returns {import('@expo/config-plugins').ConfigPlugin}
*/
module.exports = function withNoBundleCompression(config) {
return withAppBuildGradle(config, androidConfig => {
@mrousavy
mrousavy / matrix.svg
Last active January 15, 2024 16:34
Matrix animation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mrousavy
mrousavy / camera-blackscreen-logs.txt
Created October 17, 2023 15:49
VisionCamera V3 bug logs; navigating away and back results in a blackscreen (tested in Expensify)
2023-10-17 17:47:28.443 24007-24540 AudioManager com.expensify.chat.dev V playSoundEffect effectType: 0
2023-10-17 17:47:28.444 24007-24540 AudioManager com.expensify.chat.dev V querySoundEffectsEnabled...
2023-10-17 17:47:28.455 24007-24007 CameraView com.expensify.chat.dev D Finding view 1909...
2023-10-17 17:47:28.455 24007-24007 CameraView com.expensify.chat.dev D Found view 1909!
2023-10-17 17:47:28.483 24007-24376 CameraView.takePhoto com.expensify.chat.dev I Taking photo... Options: {qualityPrioritization=speed, flash=off}
2023-10-17 17:47:28.487 24007-24376 CameraSession com.expensify.chat.dev I Photo capture 0/3 - preparing capture request (3968x2976)...
2023-10-17 17:47:28.499 24007-24376 CameraSession com.expensify.chat.dev I Photo capture 1/3 - starting capture...
2023-10-17 17:47:28.537 24007-24007 ViewRootImpl
@mrousavy
mrousavy / devices-iphone11-pro.json
Created October 3, 2023 10:39
VisionCamera Devices (iPhone 15 Pro and iPhone 11 Pro)
[
{
"devices": [
"ultra-wide-angle-camera",
"wide-angle-camera",
"telephoto-camera"
],
"hasTorch": true,
"hasFlash": true,
"name": "Back Triple Camera",
@mrousavy
mrousavy / private-jsi-consulting.cpp
Created November 2, 2021 14:01
Notes from the JSI Consulting Session
/**
* jsi::Value
* - .asNumber() -> double
* - .asBoolean() -> bool
* - jsi::Value::undefined()
* - jsi::Value::null()
* - jsi::String
* - jsi::Symbol
* - jsi::Object
@mrousavy
mrousavy / settings.json
Last active September 9, 2021 19:59
My VSCode settings + themes + extensions
// VSCode Settings (hit `Cmd + ,` to open settings)
{
"editor.smoothScrolling": true,
"editor.fontSize": 16,
"editor.fontFamily": "Fira Mono, Consolas, 'Courier New', monospace",
"editor.wordWrap": "on",
"editor.tabCompletion": "on",
"explorer.openEditors.visible": 0,
"explorer.autoReveal": false,
@mrousavy
mrousavy / fastReverse.ts
Last active January 28, 2022 22:59
A JS function that returns a copy of the input Array in reversed order
/**
* Returns a reversed copy of the given Array
*/
export function fastReverse<T>(arr: T[]): T[] {
const result = new Array<T>(arr.length);
for (let i = 0; i < arr.length; i++) {
result[i] = arr[arr.length - 1 - i];
}
return result;
};
@mrousavy
mrousavy / oss.md
Last active April 8, 2021 13:10
maintaining open-source software is hard.

SVG Banners

@mrousavy
mrousavy / ghost.md
Created March 30, 2021 18:55
👻👻👻

SVG Banners