Skip to content

Instantly share code, notes, and snippets.

View franko4don's full-sized avatar
🏠
Working from home

Franklin franko4don

🏠
Working from home
View GitHub Profile
name: E2E tests with detox
on:
pull_request:
types: [opened, edited]
jobs:
test:
runs-on: macos-latest
timeout-minutes: 40
@franko4don
franko4don / AnimatedText.tsx
Last active August 2, 2024 07:29
This is a stripped down version of https://www.npmjs.com/package/react-native-animated-numbers but with support for decimal numbers.
import React, { useCallback, useMemo, useRef } from 'react';
import type {
LayoutChangeEvent,
StyleProp,
TextStyle,
ViewStyle,
} from 'react-native';
import { Text, View, Animated, Easing, StyleSheet } from 'react-native';
function usePrevious(value: number): number {
import React, { useEffect } from "react";
import { View } from "react-native-cadana-components";
import Animated, { useSharedValue, useAnimatedProps, withTiming, withRepeat,Easing } from 'react-native-reanimated';
import Svg, { Path, G } from 'react-native-svg';
export default function Loading() {
const radius1 = 24; // radius
const radius2 = 17; // radius
const radius3 = 10; // radius
const duration = 3000; // duration of one full rotation
@franko4don
franko4don / mulltisig.sol
Created May 28, 2024 13:27
Test Verification contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract MultiSigWallet {
address[] public approvers;
uint public quorum;
// Transfer struct
// Called by one of the approver addressese to suggest a transfer of tokens
from locust import HttpUser, between, task
class WebsiteUser(HttpUser):
wait_time = between(5, 10)
@task
def index(self):
self.client.get("/")
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="5.0" jmeter="5.6.2">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.tearDown_on_shutdown">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
import React, {Component, useEffect, useState} from 'react';
import {getAllCountries} from 'react-native-country-picker-modal'
import { useDispatch, useSelector } from 'react-redux';
import { generalAction } from 'redux/actions/GeneralAction';
import LoginScreen from 'components/Screens/Auth/Login';
import PhonNumberModal from 'components/Screens/Auth/PhoneNumberModal';
import { GoogleSignin, statusCodes } from '@react-native-community/google-signin';
import { appleAuth, appleAuthAndroid } from '@invertase/react-native-apple-authentication';
import { isAndroid, randomString, toast } from 'helpers/Helper';
import enums from 'config/enums';
0xd4Ad62A2F37D5179298fA2C600c1B2a5d5B35743
/**
* @api {get} /v2/chatstory Get Users' ChatStory
* @apiName Get ChatStory
* @apiGroup ChatStory
*/
async getChatStory(req, res) {
const { userId } = req.body;
try {
const pageOptions = super.getPaginationOptions(req);
let totalChatStory = await ChatStory.countDocuments({isActive: true, publishedStatus: 'published'});
/* istanbul ignore file */
import constants from '../config/constants.js';
import dotenv from 'dotenv';
dotenv.config();
const {
FAILED, SUCCESS, HTTP_UNPROCESSABLE_ENTITY,
HTTP_NOT_FOUND, HTTP_BAD_REQUEST, HTTP_CONFLICT,
HTTP_FORBIDDEN, HTTP_OK, HTTP_UNAUTHORIZED
} = constants;