Skip to content

Instantly share code, notes, and snippets.

View image72's full-sized avatar

image72 image72

View GitHub Profile
@image72
image72 / README.md
Last active October 30, 2025 10:53
Alpine Chrome Docker with auto-start - Self-contained Dockerfile with heredocs (no external files needed)

Alpine Chrome Selkies Docker

A lightweight Alpine-based Chrome browser container using the Selkies base image with auto-start functionality.

Quick Start

For AMD64/x86_64 servers:

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
"use client";
// Import necessary utilities and components.
// tailwind-merge is used to intelligently merge Tailwind CSS classes, preventing conflicts.
import { twMerge } from "tailwind-merge";
// useState is a React Hook for managing state within the component.
import { useState } from "react";
// Custom icon components for the sidebar.
import {
SidebarIcon,
@image72
image72 / cf-ddns.sh
Created September 15, 2025 10:26 — forked from prnake/cf-ddns.sh
CloudFlare DDNS
#!/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
@image72
image72 / electric-border.markdown
Created August 31, 2025 10:35
Electric Border
@image72
image72 / index.html
Created April 18, 2025 09:06
OutRun ( no canvas)
<div id="game">
<div id="road">
<div id="cloud"></div>
<div id="hero"></div>
</div>
<div id="hud">
@image72
image72 / no-native-navigation.js
Created February 9, 2025 15:03
eslint, forbid native navigations in vue components.
// lib/rules/no-native-navigation.js
module.exports = {
meta: {
type: 'problem',
docs: {
description: 'Forbid native navigation methods in Vue components',
category: 'Best Practices',
recommended: true,
},
fixable: null,
type RequestConfig = RequestInit & {
baseURL?: string;
timeout?: number;
params?: Record<string, string>;
signal?: AbortSignal;
};
type InterceptorFn = (config: RequestConfig) => RequestConfig | Promise<RequestConfig>;
class FetchWrapper {
@image72
image72 / http-server-upload.js
Created September 11, 2024 01:01
simple http server
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() },
@image72
image72 / node-nginx.dockerfile
Created August 2, 2024 01:49
normal nodejs project with nginx.
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