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 / 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

@mrousavy
mrousavy / useStyle.ts
Last active August 1, 2023 13:16
`useStyle` - a typed `useMemo` for styles which also includes style flattening and searching
import { DependencyList, useMemo } from "react";
import {
ImageStyle,
RegisteredStyle,
StyleProp,
StyleSheet,
TextStyle,
ViewStyle,
} from "react-native";
@mrousavy
mrousavy / MEMOIZE.md
Last active December 2, 2024 00:15
Memoize!!! 💾 - a react (native) performance guide
In computing, memoization or memoisation
is an optimization technique used primarily
to speed up computer programs by storing
the results of expensive function calls and  
returning the cached result when the same
inputs occur again.                                         
                                                     — wikipedia