Skip to content

Instantly share code, notes, and snippets.

View jeremybarbet's full-sized avatar
🌍

Jérémy Barbet jeremybarbet

🌍
View GitHub Profile
@jeremybarbet
jeremybarbet / SplitScreen.tsx
Created November 22, 2023 20:52 — forked from smontlouis/SplitScreen.tsx
Amie in-app split screen in react-native
import { useWindowDimensions } from 'react-native'
import { Gesture } from 'react-native-gesture-handler'
import Animated, {
Extrapolation,
WithSpringConfig,
interpolate,
scrollTo,
useAnimatedRef,
useAnimatedScrollHandler,
useAnimatedStyle,
rvm_log()
{
[[ ${rvm_quiet_flag} == 1 ]] && return
+ printf "%b" "$*"
- printf "%b" "$*\n"
}
export NODE_BINARY="/usr/local/bin/node"
@jeremybarbet
jeremybarbet / installcdo.sh
Created October 17, 2021 17:33 — forked from mainvoid007/installcdo.sh
install cdo with grib2, hdf5, netcdf4
#!/bin/bash
# Institut für Wetter- und Klimakommunikation GmbH / Qmet
# O. Maywald <[email protected]>
# This should install CDO with grib2, netcdf and HDF5 support. Note that the binaries are in /opt/cdo-install/bin.
# For further information look:
# http://www.studytrails.com/blog/install-climate-data-operator-cdo-with-netcdf-grib2-and-hdf5-support/
# docker-command
diff --git a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraView.kt b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraView.kt
index f6dc227..f2446f0 100644
--- a/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraView.kt
+++ b/node_modules/react-native-vision-camera/android/src/main/java/com/mrousavy/camera/CameraView.kt
@@ -356,9 +356,11 @@ class CameraView(context: Context) : FrameLayout(context), LifecycleOwner {
// User has selected a custom format={}. Use that
val format = DeviceFormat(format!!)
Log.i(TAG, "Using custom format - photo: ${format.photoSize}, video: ${format.videoSize} @ $fps FPS")
- previewBuilder.setTargetResolution(format.videoSize)
- imageCaptureBuilder.setTargetResolution(format.photoSize)
@jeremybarbet
jeremybarbet / index.tsx
Last active April 18, 2020 20:48
Because I always forget about it and spend hours looking for this solution on Google
import React, { forwardRef, useImperativeHandle, useRef } from 'react';
const Component = forwardRef((_, ref) => {
useImperativeHandle(ref, () => ({
internalPress() {
// whatever you want to call
},
}));
return <div />; // DOM
XMLHttpRequest = GLOBAL.originalXMLHttpRequest ?
GLOBAL.originalXMLHttpRequest :
GLOBAL.XMLHttpRequest;
// fetch logger
global._fetch = fetch;
global.fetch = function (uri, options, ...args) {
return global._fetch(uri, options, ...args).then((response) => {
console.log('Fetch', { request: { uri, options, ...args }, response });
return response;
// This list comes from Wikipedia deprecated timezones: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
const deprecatedList = [
{ old: 'Australia/ACT', new: 'Australia/Sydney' },
{ old: 'Australia/LHI', new: 'Australia/Lord_Howe' },
{ old: 'Australia/North', new: 'Australia/Darwin' },
{ old: 'Australia/NSW', new: 'Australia/Sydney' },
{ old: 'Australia/Queensland', new: 'Australia/Brisbane' },
{ old: 'Australia/South', new: 'Australia/Adelaide' },
{ old: 'Australia/Tasmania', new: 'Australia/Hobart' },
{ old: 'Australia/Victoria', new: 'Australia/Melbourne' },
@jeremybarbet
jeremybarbet / clean.sh
Last active August 7, 2020 09:20
Remove node_modules folders from specific directory
cd www/
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@jeremybarbet
jeremybarbet / Example1.js
Last active June 15, 2018 11:34
Register animations through GsapTools
import React, { PureComponent } from 'react';
import { TimelineLite } from 'gsap';
import { add } from 'gsap-tools';
export default class Example1 extends PureComponent {
componentDidMount() {
this.animate();
}