Skip to content

Instantly share code, notes, and snippets.

View MatteoGauthier's full-sized avatar
🌴
Working on squale.agency 🍹

Mattèo Gauthier MatteoGauthier

🌴
Working on squale.agency 🍹
View GitHub Profile
@eveningkid
eveningkid / react-native-animated_twitter-profile.jsx
Last active September 30, 2025 03:34
React Native Animated: Twitter Profile Example
// Expo SDK41
// expo-blur: ~9.0.3
import React, { useRef } from 'react';
import {
Animated,
Image,
ImageBackground,
ScrollView,
StatusBar,
@Sclafus
Sclafus / n8n-install-pi.sh
Last active August 10, 2025 16:13
Install n8n on raspberry pi (natively)
#!/bin/bash
# updating repositories
sudo apt update
# installing build tools and python
sudo apt install build-essential python
# installing nodejs
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
@pjchender
pjchender / Form.tsx
Created June 28, 2021 05:21
Nested Object Fields in React Hook Form
import { DevTool } from '@hookform/devtools';
import { yupResolver } from '@hookform/resolvers/yup';
import { Button, makeStyles, TextField } from '@material-ui/core';
import { Controller, SubmitHandler, useForm } from 'react-hook-form';
import * as yup from 'yup';
const useStyles = makeStyles(theme => ({
root: {
display: 'flex',
flexDirection: 'column',
@intergalacticspacehighway
intergalacticspacehighway / useKeyboardBottomInset hook
Created August 10, 2021 04:54
Hook to get keyboard height in React Native and add bottom/padding inset on a view.
import { Keyboard, Platform, KeyboardEvent } from 'react-native';
const useKeyboardBottomInset = () => {
const [bottom, setBottom] = React.useState(0);
const subscriptions = React.useRef([]);
React.useEffect(() => {
function onKeyboardChange(e) {
if (
e.startCoordinates &&
@emeraldsanto
emeraldsanto / async-batch.ts
Created February 26, 2022 17:39
Utility function to sequentially run batches of async operations with configurable concurrency.
/**
* Allows for sequentially running batches of async operations.
* @param {number} concurrency The maximum number of operations to run concurrently.
*/
export function batch(concurrency: number) {
return async function <TElement, TResult>(xs: Array<TElement>, handler: (x: TElement) => TResult): Promise<Array<TResult>> {
const results: Array<TResult> = [];
const batches = Array.from({ length: Math.ceil(xs.length / concurrency) }, (_, i) => i)
for await (const batchNumber of batches) {
@samselikoff
samselikoff / chart-with-d3.jsx
Last active July 7, 2025 06:54
Diff from "Building an Animated Line Chart with d3, React and Framer Motion" https://www.youtube.com/watch?v=kPbRDn5Fg0Y
import * as d3 from "d3";
import {
eachMonthOfInterval,
endOfMonth,
format,
isSameMonth,
parseISO,
startOfMonth,
} from "date-fns";
import useMeasure from "react-use-measure";
@steven-tey
steven-tey / title-from-url.ts
Last active November 13, 2025 06:54
Get Title from URL
// Note: this gist is a part of this OSS project that I'm currently working on: https://github.com/steven-tey/dub
export default async function getTitleFromUrl (url: string) {
const controller = new AbortController();
const timeoutId = setTimeout(() => controller.abort(), 2000); // timeout if it takes longer than 2 seconds
const title = await fetch(url, { signal: controller.signal })
.then((res) => {
clearTimeout(timeoutId);
return res.text();
})
@danirukun
danirukun / whisper-transcribe.bash
Last active September 2, 2025 08:37
Transcribe (and translate) any VOD (e.g. from Youtube) using Whisper from OpenAI and embed subtitles!
#!/usr/bin/env bash
# Small shell script to more easily automatically download and transcribe live stream VODs.
# This uses YT-DLP, ffmpeg and the CPP version of Whisper: https://github.com/ggerganov/whisper.cpp
# Use `./transcribe-vod help` to print help info.
# MIT License
# Copyright (c) 2022 Daniils Petrovs
@hirbod
hirbod / app-release.md
Last active March 12, 2025 20:12
How to get your App through the App/Play store safely

How to Successfully Publish Your App on the App Store or Google Play

As someone who has released many apps starting in 2015 using frameworks such as Cordova and Ionic, and more recently using React Native and Expo, I have learned that the rules for publishing apps can change frequently and can sometimes be challenging to navigate. With that in mind, I want to provide a brief guide to help others navigate the process. While this guide may not cover every aspect of publishing an app, it does cover general tips and information that should be useful for anyone looking to release their app on the App Store or Google Play.

Metadata

Keywords, Description, Screenshots, App Name, Promo Videos

There are significant differences between Apple and Google when it comes to metadata. Apple is generally stricter than Google, so it is advisable to follow Apple's guidelines to ensure the best chances of success on both platforms. Here are some tips to keep in mind:

  1. Keep your screenshots and promo videos separat
@jasdev
jasdev / ScrimLoader.swift
Last active April 19, 2024 03:47
Rough sketch of Arc’s scrim loading view.
import SwiftUI
/**
### Exercises for the viewer
- Phase interrupt handling.
- Use Swift concurrency.
- Color scheme awareness.
- Rework animations to be more spring-like à la what shipped in `0.90.0`.