Copy of github.com/askrobots/network-computer (MIT): a desk you reach from anything. The original lives on GitHub.

2 downloads

Download zip
Clone
Clone with git
git clone https://gitstable.com/git/demo/network-computer.git
HTTPS
https://gitstable.com/git/demo/network-computer.git
SSH
ssh://git@gitstable.com:2222/demo/network-computer.git

Cloning needs no sign-in. Pushing over HTTPS asks for your username and an access token. SSH needs your key under SSH keys.

GitStable demo README: say this is a copy and where the original is cde82c2 14 hours, 3 minutes ago History
nc-send · 999 bytes · 17 lines
1#!/bin/sh
2# Send files to the device you are connected from; it offers each as a download.
3# nc-send FILE... (also the file manager's right-click "Send to my device")
4SOCK=${NC_SEND_SOCKET:-/run/nc-host/send.sock}
5say() { echo "$1"; command -v notify-send >/dev/null && notify-send -i document-send "Send to my device" "$1"; }
6[ $# -gt 0 ] || { echo "usage: nc-send FILE..."; exit 2; }
7[ -S "$SOCK" ] || { say "nc-host is not running here"; exit 1; }
8rc=0
9for f in "$@"; do
10 if [ ! -f "$f" ] || [ ! -r "$f" ]; then say "$(basename "$f"): not a readable file (folders: zip them first)"; rc=1; continue; fi
11 name=$(basename "$f")
12 q=$(python3 -c 'import sys,urllib.parse; print(urllib.parse.quote(sys.argv[1]))' "$name")
13 out=$(curl -sS --unix-socket "$SOCK" -T "$f" -w '\n%{http_code}' "http://desk/send?name=$q" 2>&1)
14 code=$(echo "$out" | tail -n 1); body=$(echo "$out" | sed '$d')
15 if [ "$code" = 200 ]; then say "$body"; else say "$name: ${body:-not sent}"; rc=1; fi
16done
17exit $rc