Skip to content

Instantly share code, notes, and snippets.

View mchaliadzinau's full-sized avatar

Mikalai Chaliadzinau mchaliadzinau

View GitHub Profile
@pie6k
pie6k / useShareForwardedRef.tsx
Created October 23, 2019 10:02
forwardRef hook
import React, { useRef, forwardRef, Ref, useEffect } from 'react';
import { TextInputProps, TextInput } from 'react-native';
import styled from 'styled-components/native';
interface Props extends TextInputProps {
showEditLabel?: boolean;
}
const Input = styled.TextInput``;
@tgaff
tgaff / mfa authentication.md
Last active November 27, 2023 16:40
mfa authentication in aws

multi-factor authentication for aws cli and eb cli commands

tldr

  1. get YOUR_MFA_SERIAL from IAM web console.
  2. get YOUR_MFA_CODE from your MFA device/app.
  3. aws sts get-session-token --serial-number YOUR_MFA_SERIAL --token-code YOUR_MFA_CODE --duration 129600
  4. Edit `~/.aws/credentials adding or editing an [mfa] section
    [mfa]