Skip to content

Instantly share code, notes, and snippets.

View luchn49's full-sized avatar
🐵

Luc Ha luchn49

🐵
  • Axon Enterprise Viet Nam
  • Viet Nam
  • 08:19 (UTC +07:00)
View GitHub Profile
@luchn49
luchn49 / PasswordField.tsx
Last active September 6, 2021 10:16
PasswordField with material-ui and react-hook-form
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { Controller, useFormContext } from 'react-hook-form'
import uniqueId from 'lodash/uniqueId'
import OutlinedInput from '@material-ui/core/OutlinedInput'
import InputLabel from '@material-ui/core/InputLabel'
import InputAdornment from '@material-ui/core/InputAdornment'
import FormControl from '@material-ui/core/FormControl'
import VisibilityIcon from '@material-ui/icons/Visibility'
import VisibilityOffIcon from '@material-ui/icons/VisibilityOff'
import FormHelperText from '@material-ui/core/FormHelperText'
@luchn49
luchn49 / handling_multiple_github_accounts.md
Created May 8, 2021 05:23 — forked from Jonalogy/handling_multiple_github_accounts.md
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes