Skip to content

Instantly share code, notes, and snippets.

View LeandrodeLimaC's full-sized avatar
🎯
Focusing

Leandro de Lima LeandrodeLimaC

🎯
Focusing
View GitHub Profile
@LeandrodeLimaC
LeandrodeLimaC / axios-timing.ts
Created March 21, 2024 16:38 — forked from forivall/axios-timing.ts
Axios Timing helper POC
import http = require('http')
import https = require('https')
import url = require('url')
import {AxiosInstance, AxiosInterceptorManager} from 'axios'
import {HttpRequestOptions as HttpFollowRequestOptions, http as httpFollow, https as httpsFollow} from 'follow-redirects'
import now = require('performance-now')
import httpAdapter = require('axios/lib/adapters/http')
import InterceptorManager = require('axios/lib/core/InterceptorManager')
@LeandrodeLimaC
LeandrodeLimaC / random-date.js
Created December 21, 2020 16:00 — forked from miguelmota/randomDate.js
Random date in JavaScript
function randomDate(start, end) {
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
}
console.log(randomDate(new Date(2012, 0, 1), new Date()));