- Shift key: nitro
- Space key: jump
| #!/bin/bash | |
| set -Efeuo pipefail | |
| SSH='ssh user@server' | |
| DIR='/remote/path' | |
| #assumes that "find" and "sha256 -r" commands work on the remote machine | |
| #count files to show live counter | |
| file_count="$($SSH "find $(printf %q "$DIR") -type f" | grep -E '/[0-9a-f]{64}$'|wc -l)" |
| const vec_sub = (a, b) => ({ x: a.x - b.x, y: a.y - b.y, z: a.z - b.z }); | |
| const vec_dot = (a, b) => a.x * b.x + a.y * b.y + a.z * b.z; | |
| const vec_len = a => Math.sqrt(a.x * a.x + a.y * a.y + a.z * a.z); | |
| const vec_norm = a => { | |
| const norm = vec_len(a); | |
| return { x: a.x / norm, y: a.y / norm, z: a.z / norm }; | |
| } | |
| /* | |
| * JS version of |
This is just a concept. Don't spam the Usenet.
Usenet is an old replicated network that is basically a giant forum. There are many providers that offer access to it. Clients use NNTP to read and write articles in newsgroups. A newsgroup is like a directory that contains a stream of articles that each have a unique message ID.
| "use strict" | |
| /**************************** config ****************************/ | |
| const PLANET = 'earth'; | |
| const URL_PREFIX = `https://kh.google.com/rt/${PLANET}/`; | |
| /****************************************************************/ | |
| const { getPlanetoid, getBulk, traverse } = require('./lib/utils')({ | |
| URL_PREFIX, DUMP_JSON_DIR: null, DUMP_RAW_DIR: null, DUMP_JSON: false, DUMP_RAW: false | |
| }); |
| "use strict" | |
| const fs = require('fs-extra'); | |
| const path = require('path'); | |
| /**************************** config ****************************/ | |
| const PLANET = 'earth'; | |
| const URL_PREFIX = `https://kh.google.com/rt/${PLANET}/`; | |
| const DL_DIR = './downloaded_files'; | |
| const [RESEARCH_DIR, DUMP_JSON_DIR, DUMP_RAW_DIR] = ['research', 'json', 'raw'].map(x => path.join(DL_DIR, x)); |