👀📎 It looks like you're preparing to MC a conference...
🚨 GIANT DISCLAIMER: This stuff is far from authoritative. But it's what I think works for me, and what I enjoy in an MC when I'm attending a conference.
const CLOUDINARY_REGEX = /^.+\.cloudinary\.com\/(?:[^\/]+\/)(?:(image|video)\/)?(?:(upload|fetch)\/)?(?:(?:[^_/]+_[^,/]+,?)*\/)?(?:v(\d+|\w{1,2})\/)?([^\.^\s]+)(?:\.(.+))?$/; | |
const url = 'http://res.cloudinary.com/oz/image/upload/v1454951830/moments/musicreach/f3432155-1be9-4510-9c3a-c1672c21fc89/f5de39a0-7ad0-48de-b53b-1d148856bcb8_540_pv.jpg'; | |
const matches = CLOUDINARY_REGEX.exec(url); | |
console.log(matches); | |
/* | |
[ | |
'http://res.cloudinary.com/oz/image/upload/v1454951830/moments/musicreach/f3432155-1be9-4510-9c3a-c1672c21fc89/f5de39a0-7ad0-48de-b53b-1d148856bcb8_540_pv.jpg', | |
'image', // resource_type | |
'upload', // type |
[![Learn VSCode](https://img.shields.io/badge/-VSCODE.pro%20%E2%86%92-gray.svg?colorB=6A788D&style=flat)](https://VSCode.pro/)
const fs = require('fs'); | |
const archiver = require('archiver'); | |
/** | |
* Zip a directory. | |
* | |
* @param {String} src Source directory path. | |
* @param {String} dst Destination path + filename.zip. | |
*/ | |
module.exports = async (src, dst) => { |
{ | |
"ip": "119.155.50.57", | |
"type": "ipv4", | |
"continent_code": "AS", | |
"continent_name": "Asia", | |
"country_code": "PK", | |
"country_name": "Pakistan", | |
"region_code": "05", | |
"region_name": "Sindh", | |
"city": "Karachi", |