const groupBy = key => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = obj[key];
objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
return objectsByKeyValue;
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 * as cheerio from "cheerio"; | |
import puppeteerExtra from "puppeteer-extra"; | |
import stealthPlugin from "puppeteer-extra-plugin-stealth"; | |
import chromium from "@sparticuz/chromium"; | |
async function searchGoogleMaps() { | |
try { | |
const start = Date.now(); | |
puppeteerExtra.use(stealthPlugin()); |
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 freshproject(){ | |
npx create-next-app@latest "$1" --typescript --eslint | |
cd "$1" | |
npm install -D tailwindcss postcss autoprefixer | |
npx tailwindcss init -p | |
truncate -s 0 tailwind.config.js | |
echo "module.exports = { content: ['./app/**/*.{js,ts,jsx,tsx}', './pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'], theme: { extend: {},}, plugins: [], };" >> tailwind.config.js | |
truncate -s 0 styles/globals.css | |
echo "@tailwind base;" >> styles/globals.css | |
echo "@tailwind components;" >> styles/globals.css |
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 Octokit from '@octokit/rest' | |
import glob from 'globby' | |
import path from 'path' | |
import { readFile } from 'fs-extra' | |
const main = async () => { | |
// There are other ways to authenticate, check https://developer.github.com/v3/#authentication | |
const octo = new Octokit({ | |
auth: process.env.PERSONAL_ACESSS_TOKEN, | |
}) |
- Text Content Generator - http://www.lipsum.com
- Favicon Generator - http://tools.dynamicdrive.com/favicon
- Data Generator - https://mockaroo.com/
- Mobile Mockup Generator - https://mockuphone.com
- Logo Generator - https://www.logaster.com
- UUID Generator - https://www.uuidgenerator.net/
- Hash Generator - https://passwordsgenerator.net/sha256-hash-generator/
- Ultimate Code Generator - https://webcode.tools/
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
document.getElementsByTagName('button')[0].onclick = function () { | |
scrollTo(document.body, 0, 1250); | |
} | |
function scrollTo(element, to, duration) { | |
var start = element.scrollTop, | |
change = to - start, | |
currentTime = 0, | |
increment = 20; | |