Before/after WebP shots used in https://github.com/tolu/deno-time-tracker
Captured by scripts/screenshot-agent.ts (Playwright + cwebp).
Before/after WebP shots used in https://github.com/tolu/deno-time-tracker
Captured by scripts/screenshot-agent.ts (Playwright + cwebp).
| #!/bin/bash | |
| # Function to get the cutoff date | |
| get_cutoff_date() { | |
| if [[ "$OSTYPE" == "darwin"* ]]; then | |
| # macOS | |
| date -v-12m +%s | |
| else | |
| # Linux and others | |
| date -d "12 months ago" +%s |
| FROM node:lts-alpine as BUILD | |
| WORKDIR /app | |
| # Copy files needed for install | |
| COPY .npmrc ./ | |
| COPY *.json ./ | |
| # Install deps | |
| RUN npm ci --ignore-scripts |
| import express from 'express'; | |
| import puppeteer from 'puppeteer'; | |
| import ua from 'useragent'; | |
| const isBot = (agent: ua.Details) => { | |
| return !agent.webkit && !agent.opera && !agent.ie && | |
| !agent.chrome && !agent.safari && !agent.mobile_safari && | |
| !agent.firefox && !agent.mozilla && !agent.android; | |
| } |
| // resource: http://ktkr3d.github.io/2020/01/27/Puppeteer-on-WSL/ | |
| // install puppeteer | |
| // > npm i -g puppeteer | |
| // use chrome from windows: add this to ~/.profile | |
| // PATH=/mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application:$PATH | |
| const puppeteer = require('puppeteer'); |
Most directly from or inspired by Understanding ES6 and Esploring ES6. So big thanks to Nicholas Zakas and Axel Rauschmayer
| #BoxStarterConfigFile | |
| #Basic Setup | |
| Update-ExecutionPolicy Unrestricted | |
| Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
| #Windows Features | |
| cinst Microsoft-Hyper-V-All -source windowsfeatures | |
| cinst IIS-WebServerRole -source windowsfeatures | |
| cinst IIS-HttpCompressionDynamic -source windowsfeatures |