IF LINUX SERVER, CONFIGURE APACHE2/NGINX via APT COMMAND
LEMP INSTALLATION RESOURCE - https://www.howtoforge.com/tutorial/ubuntu-laravel-php-nginx/
RPM (RED HAT, FEDORA, CentOS), yum COMMAND
yum install php| Yup.object().shape({ | |
| email: Yup.string().email('Invalid email address').required('Email is required!'), | |
| username: Yup.string().required('This man needs a username').when('email', (email, schema) => { | |
| if (email === 'foobar@example.com') { return schema.min(10); } | |
| return schema; | |
| }), | |
| }); |
| // https://blog.bitsrc.io/setting-up-axios-interceptors-for-all-http-calls-in-an-application-71bc2c636e4e | |
| import axios, { AxiosError, AxiosRequestConfig } from "axios"; | |
| let MAX_RETRIES = 5; | |
| let ONE_MINUTE = 60 * 1000; | |
| interface AxiosConfig extends AxiosRequestConfig { | |
| retryCount?: number; |
IF LINUX SERVER, CONFIGURE APACHE2/NGINX via APT COMMAND
LEMP INSTALLATION RESOURCE - https://www.howtoforge.com/tutorial/ubuntu-laravel-php-nginx/
RPM (RED HAT, FEDORA, CentOS), yum COMMAND
yum install php| import React from "react"; | |
| import styled, { css } from "styled-components"; | |
| import { Avatar } from "@material-ui/core"; | |
| // -------------------------- Defining all the css sizes ------------------------ | |
| export const SmallestSizeCSS = css` | |
| width: 30px; | |
| height: 30px; | |
| ${props => props.theme.breakpoints.up("lg")} { |
| <?php | |
| /** | |
| ----------------------------------------------------- | |
| Enforce the Laravel Code Style using PHP CS Fixer 3.x | |
| ----------------------------------------------------- | |
| Credits go to Laravel Shift & Andreas Elia. | |
| https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 | |
| if( typeof(Storage) === 'undefined' ) { | |
| // Sorry! No Web Storage support... | |
| } | |
| /** | |
| * Check if key exists in local storage | |
| * @param string key | |
| * @return boolean | |
| */ | |
| function localStorageHas (key) { |
| // for multiple requests | |
| let isRefreshing = false; | |
| let failedQueue = []; | |
| const processQueue = (error, token = null) => { | |
| failedQueue.forEach(prom => { | |
| if (error) { | |
| prom.reject(error); | |
| } else { | |
| prom.resolve(token); |
| var xhr = new XMLHttpRequest(); | |
| xhr.open("GET", "/path/to/local/image/file", true); | |
| xhr.responseType = "blob"; | |
| xhr.onload = function (e) { | |
| console.log(this.response); | |
| var reader = new FileReader(); | |
| reader.onload = function(event) { | |
| var res = event.target.result; | |
| console.log(res) | |
| } |
| import * as yup from 'yup'; | |
| import { setIn } from 'final-form'; | |
| const validationSchema = yup.object({ | |
| email: yup.string().email(), | |
| shipping: yup.object({ | |
| name: yup.string(), | |
| phone: yup.object({ | |
| code: yup.string().matches(/^\+\d+$/i), | |
| number: yup.number().max(10), |