Skip to content

Instantly share code, notes, and snippets.

View Zerquix18's full-sized avatar
🎯
Focusing

I'm Luis! ^-^ Zerquix18

🎯
Focusing
View GitHub Profile
import React, { useCallback, useEffect, useState } from 'react';
import { Button } from 'semantic-ui-react';
import { MapLatLng } from '../../../../../../../../../models';
import { computeDistanceBetween } from '../../../../../../../../../utils';
type Position = { date: Date; position: MapLatLng };
const MAX_POSITIONS = 3;
const Speedometer: React.FC = () => {
@Zerquix18
Zerquix18 / DynamoTable.ts
Created May 6, 2022 18:40
A class to handle DynamoDB databases
import * as DynamoDB from 'aws-sdk/clients/dynamodb';
import { chunk } from 'lodash';
import { v4 as uuid } from 'uuid';
export type ItemStructure = { [key: string]: any; }
export type Filter = {
expression: string;
values?: ItemStructure;
} | ItemStructure;
const arr1 = [
["name", "id", "age", "country"],
["Susan", "3", "20", "mali"],
["John", "1", "21", "chad"],
["Jose", "2", "23", "oman"],
["Alex", "4", "20", "fiji"],
];
const arr2 = [
["name", "id", "height"],