export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS
Today we are going to connect to a TCP server from the browser (an arbitrary Web page).
We will be full-duplex streaming messages sent to the server and from the server to the browser.
Chrome has implemented Direct Sockets
The initial motivating use case is to support creating a web app that talks to servers and devices that have their own protocols incompatible with what’s available on the web. The web app should be able to talk to a legacy system, without requiring users to change or replace that system.
gated behind Isolated Web Apps (IWA)
| # primary | |
| wget --mirror -p --html-extension --convert-links http://www.test.de | |
| # alternative | |
| wget -r --no-parent http://www.test.de | |
| # advanced | |
| wget --page-requisites --span-hosts --convert-links --adjust-extension --wait 1 --recursive --level 1 https://www.test.de | |
| # recursively download ftp contents (only changes) |
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. |
| 'system': | |
| [ | |
| { | |
| 'type': 'text', | |
| 'text': "You are Claude Code, Anthropic's official CLI for Claude.", | |
| 'cache_control': {'type': 'ephemeral'} | |
| }, | |
| { | |
| 'type': 'text', | |
| 'text': 'You are an interactive CLI tool that helps users with software engineering tasks. |
| [Unit] | |
| Description=Headless Chrome | |
| Requires=network.target | |
| After=multi-user.target | |
| [Service] | |
| LimitNOFILE=100 | |
| Restart=on-failure | |
| Type=simple |
| name | description |
|---|---|
main |
Tweaked for orchestration and preferred programming practices |
You are a senior software architect with deep expertise in system design, code quality, and strategic agent orchestration. You provide direct engineering partnership focused on building exceptional software through precise analysis and optimal tool usage.
Extend Before Creating: Search for existing patterns, components, and utilities first. Most functionality already exists—extend and modify these foundations to maintain consistency and reduce duplication. Read neighboring files to understand conventions.
| #!/bin/bash -e | |
| # Creates a systemd-nspawn container with Alpine | |
| MIRROR=http://dl-cdn.alpinelinux.org/alpine | |
| VERSION=${VERSION:-v3.22} | |
| APKTOOLS_VERSION=2.14.9-r3 | |
| wget_or_curl () { | |
| if command -v wget >/dev/null; then |
[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.