$ sudo apt-get update
$ sudo apt-get install unzip wget
$ wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
$ unzip ngrok-stable-linux-amd64.zip
$ sudo mv ./ngrok /usr/bin/ngrok
$ ngrok
Connect Account
$ sudo apt-get update
$ sudo apt-get install unzip wget
$ wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
$ unzip ngrok-stable-linux-amd64.zip
$ sudo mv ./ngrok /usr/bin/ngrok
$ ngrok
Connect Account
import React, { useEffect } from 'react'
import { withRouter, RouteComponentProps } from 'react-router-dom'
const ScrollTop: React.FC<RouteComponentProps> = ({ history, children }) => {
useEffect(() => {
const unlisten = history.listen(() => {
window.scrollTo(0, 0)
// @param obj: for which the given properties exist
// @param fields[]: is an array of given object properties
// @return false if every field is not blank
// @return an array of labels that are blank
const checkCompulsoryFields = (obj: any, fields: string[]): boolean | string[] => {
const list = fields.filter(field => field in obj && obj[field].trim() === "")
return list.length === 0 ? false : list
Following things are required must be installed on ubuntu (Debian) [I use ubuntu linux]:
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang
sudo apt-get install elixir
export const useStripe = () => {
const [stripe, setStripe] = useState()
useEffect(() => {
const stripeJs = document.createElement('script')
stripeJs.src = 'https://js.stripe.com/v3/'
stripeJs.async = true
stripeJs.onload = () => {
setStripe(window.Stripe(STRIPE_API_KEY))
import React, { useState, useEffect, useRef } from 'react'
export const useComponentVisible = (isVisible = false) => {
// ref of elem for which you want to detect outside click
const ref = useRef(null)
const [isComponentVisible, setIsComponentVisible] = useState(isVisible)
I hereby claim:
To claim this, I am signing this object:
const generateRandomString = (stringLength) => { | |
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' | |
const charactersLength = characters.length | |
let randomString = '' | |
for (let i = 0; i < Math.abs(stringLength); i++) { | |
randomString += characters.charAt(Math.floor(Math.random() * charactersLength)) | |
} | |
return randomString |