Skip to content

Instantly share code, notes, and snippets.

View sregg's full-sized avatar

Simon Reggiani sregg

View GitHub Profile
@sregg
sregg / e2e.yml
Created April 11, 2024 09:14
Maestro GitHub Actions Workflow
name: E2E tests
on:
workflow_dispatch:
# daily builds on week days at 6pm EDT (22:00 UTC or 23:00 UTC (day light savings adjustment))
schedule:
- cron: '00 23 * * 1,2,3,4,5'
env:
NO_FLIPPER: 1
@sregg
sregg / Landing.tsx
Created July 22, 2023 19:16
Cookin Landing Screen Animations
import { useNavigation } from '@react-navigation/native';
import React, { useCallback, useEffect, useRef } from 'react';
import { StyleSheet, useWindowDimensions, View } from 'react-native';
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
import Animated, {
Extrapolation,
interpolate,
runOnJS,
useAnimatedStyle,
useSharedValue,
@sregg
sregg / aws_amplify_push_error.log
Created June 12, 2021 13:09
AWS Amplify push error
simonreggiani@Simons-MacBook-Pro local-tennis-app % amplify push
✔ Successfully pulled backend environment dev from the cloud.
Current Environment: dev
| Category | Resource name | Operation | Provider plugin |
| --------- | ----------------------- | --------- | ----------------- |
| Function | sendPushOnCreateMessage | Update | awscloudformation |
| Auth | localtennisapp879bce4a | No Change | awscloudformation |
| Api | localtennisapp | No Change | awscloudformation |
@sregg
sregg / jwtMiddleware.ts
Created November 13, 2018 20:41
Redux JWT Middleware
export const jwtMiddleware: Middleware = (
api: MiddlewareAPI<Dispatch, IRootState>
) => {
// add JWT access token to all request header if present
axios.interceptors.request.use((config: AxiosRequestConfig) => {
const authState = api.getState().auth;
if (authState.access) {
config.headers = {
...config.headers,
Authorization: `Bearer ${authState.access}`,