I hereby claim:
- I am mudssrali on github.
- I am mudssrali (https://keybase.io/mudssrali) on keybase.
- I have a public key whose fingerprint is CD9B 8112 82E3 12AA 2390 367F A1D9 A7D9 3FEF 2B1B
To claim this, I am signing this object:
| defmodule Crypto.AES do | |
| @block_size 16 | |
| @secret_key "" | |
| def encrypt(text) do | |
| secret_key_hash = make_hash(@secret_key, 16) | |
| text = pad_pkcs7(text, @block_size) | |
| encrypted_text = :crypto.block_encrypt(:aes_ecb, secret_key_hash, text) | |
| Base.encode64(encrypted_text) |
| const express = require("express"); | |
| const cors = require('cors'); | |
| const crypto = require('crypto-js'); | |
| const PORT = process.env.PORT ?? 8080; | |
| const HOST = process.env.HOST ?? '0.0.0.0'; | |
| const SECRET_KEY = process.env.SECRET_KEY ?? "write something secret here"; | |
| const app = express(); | |
| app.use(cors()); |
| defmodule AES do | |
| @block_size 16 | |
| @secret_key "write something secret" | |
| def encrypt(text) do | |
| secret_key_hash = hash(@secret_key, 32) | |
| # create random Initialisation Vector | |
| iv = :crypto.strong_rand_bytes(16) | |
| text = pad(text, @block_size) |
| 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 |
I hereby claim:
To claim this, I am signing this object:
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)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))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.debsudo apt-get updatesudo apt-get install esl-erlangsudo apt-get install elixir// @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