test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { NextApiRequest, NextApiResponse } from 'next'; | |
| import nodemailer from 'nodemailer'; | |
| import type SMTPTransport from 'nodemailer/lib/smtp-transport'; | |
| import Mail from 'nodemailer/lib/mailer'; | |
| import { FormDataKey, PayloadFormData } from '../../lib/useRMVform'; | |
| import { ManVanInputs } from '../../page-components/MvForm'; | |
| import { RMVInputs } from '../../page-components/RmvForm'; | |
| import { | |
| buildBaseHTML, | |
| buildCallbackHTML, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { group, sleep, check } from "k6"; | |
| import { parseHTML } from 'k6/html'; | |
| import { Trend } from "k6/metrics"; | |
| import http from "k6/http"; | |
| import { randomIntBetween, uuidv4 } from "https://jslib.k6.io/k6-utils/1.0.0/index.js"; | |
| const usersToken = JSON.parse(open("./users.json")); | |
| const URL = "https://myapp.com"; | |
| const TEST_NAME = "First Test - simple user flow"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const mustBeValidDateFormat = (value: string): boolean => /^[0-9.\/]+$/i.test(value); | |
| const mustBeValidMonth = (value: string): boolean => { | |
| const [month] = value.split('/'); | |
| if (!/^\d*$/.test(month)) { return false; } | |
| const inputMonth = parseInt(month, 10); | |
| return inputMonth > 0 && inputMonth < 13; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const modalHOC = store => { | |
| return class Modal { | |
| constructor(config = {}) { | |
| } | |
| myPublicMethod() { | |
| if(store.getState().isOpen) { | |
| // Do your magic | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const routerMiddleware = history => () => next => action => { | |
| switch (action.type) { | |
| case PUSH: | |
| history.push(action.payload); | |
| break; | |
| case REPLACE: | |
| history.replace(action.payload); | |
| break; | |
| case GO: | |
| history.go(action.payload); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const deBounced = debounce(() => { | |
| // The RAF ensures it doesn't run when tab isn't visible | |
| requestAnimationFrame(() => { | |
| // the RIC makes sure the browser isn't busy with something | |
| // timeout: max amount of time to wait. | |
| requestIdleCallback(fn(), { timeout: 500}) | |
| }) | |
| }, 30000) |
- Do you have an Github account ? If not create one.
- Install required tools
- Latest Git Client
- gpg tools
# Ubuntu
sudo apt-get install gpa seahorse
# Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| if ( typeof window.CustomEvent === "function" ) return false; | |
| function CustomEvent ( event, params ) { | |
| params = params || { bubbles: false, cancelable: false, detail: undefined }; | |
| var evt = document.createEvent( 'CustomEvent' ); | |
| evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); | |
| return evt; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <form> | |
| <input | |
| type="number" | |
| placeholder="Enter 42" | |
| min="42" | |
| max="42" | |
| required> | |
| <input | |
| type="email" |
NewerOlder