A lightweight Alpine-based Chrome browser container using the Selkies base image with auto-start functionality.
docker run -d \
--name=alpine-chrome \| #!/usr/bin/env bash | |
| # ========================================================== | |
| # All-in-One: Docker + docker-compose-plugin + 16 GB swap | |
| # Tested on Ubuntu 20.04/22.04/24.04 (x86_64 & arm64) | |
| # 1) 安装官方最新 Docker & Compose | |
| # 2) 创建 16 GB /swapfile 并开机自启 | |
| # 全程无交互,失败即退出 | |
| # ========================================================== | |
| set -euo pipefail |
| #!/usr/bin/env bash | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| # Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
| # Can retrieve cloudflare Domain id and list zone's, because, lazy | |
| # Place at: | |
| # curl https://raw.githubusercontent.com/yulewang/cloudflare-api-v4-ddns/master/cf-v4-ddns.sh > /usr/local/bin/cf-ddns.sh && chmod +x /usr/local/bin/cf-ddns.sh |
A Pen by Bálint Ferenczy on CodePen.
| <div id="game"> | |
| <div id="road"> | |
| <div id="cloud"></div> | |
| <div id="hero"></div> | |
| </div> | |
| <div id="hud"> |
| type RequestConfig = RequestInit & { | |
| baseURL?: string; | |
| timeout?: number; | |
| params?: Record<string, string>; | |
| signal?: AbortSignal; | |
| }; | |
| type InterceptorFn = (config: RequestConfig) => RequestConfig | Promise<RequestConfig>; | |
| class FetchWrapper { |
| const http = require('node:http'); | |
| const { IncomingForm } = require('formidable'); | |
| const { promises: fs, constants: fsConstants } = require('node:fs'); | |
| const path = require('node:path'); | |
| const os = require('node:os'); | |
| const { parseArgs } = require('node:util'); | |
| const options = { | |
| port: { type: 'string', short: 'p', default: process.env.PORT || '8080' }, | |
| 'upload-dir': { type: 'string', short: 'd', default: process.env.UPLOAD_DIR || process.cwd() }, |
| FROM node:20-alpine as build-stage | |
| ARG HTTP_PROXY | |
| ARG HTTPS_PROXY | |
| ENV HTTP_PROXY=$HTTP_PROXY | |
| ENV HTTPS_PROXY=$HTTPS_PROXY | |
| WORKDIR /usr/src/app | |
| COPY . . | |
| RUN npm -g install pnpm@latest && pnpm config set registry=https://registry.npmmirror.com && pnpm install && npm run build |