Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1b - Decimal:
27
| ncat -klnvp 8080 --sh-exec "\ # Start ncat in listening mode and redirect input AND output to a shell command | |
| grep --line-buffered GET | \ # retrieve only GET request | |
| sed --unbuffered -e 's@GET \([^ ]*\) HTTP/1.1@\1\n\n@g' | \ # From the GET request, retrieve the path | |
| xargs -i{} curl -sSL -w '\n\n\n' -D - http://host:port/{} | \ # Redirect the path to a specific host:port | |
| tee -a /tmp/curl-response | \ # For debug purposes | |
| sed --unbuffered -e 's@\(Content-Length: [0-9]*\)@\1\nAccess-Control-Allow-Origin: *@g' | \ # Add the CORS header | |
| tee -a /tmp/proxy.log" # For debug purposes |
Dump pages: https://dumps.wikimedia.org/
The format of the url of a dump file is https://<host>/<wikisite>/<dumpdate>/<file>
A dataset for simple testing is simplewiki: https://dumps.wikimedia.org/simplewiki/20210801/
Simple english contains wiki ~300000 article. Easy to download and test idea against.
Files are dumped in different formats for different purposes.
| $ cat > test.zig | |
| export fn add(lhs: f32, rhs: f32) f32 { | |
| return lhs + rhs; | |
| } | |
| $ zig build-lib test.zig -target wasm32-freestanding -dynamic | |
| $ cat > test.js | |
| WebAssembly.instantiate((function() { | |
| const source = require("fs").readFileSync("test.wasm"); | |
| return new Uint8Array(source); | |
| })(), { env: {} }).then(wasm => { |
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <link rel="shortcut icon" href="#" /> | |
| <title>WW</title> | |
| <script type="text/javascript" src="index.js"></script> | |
| </head> | |
| <body> | |
| </body> |
| #!/usr/bin/env bash | |
| if [ $# -lt 1 ] | |
| then | |
| echo "$0: error: missing arguments" | |
| echo "usage: $0 <command> <args...>" | |
| exit 1 | |
| fi | |
| for folder in `find . -maxdepth 1 ! -path . -type d` |
| #!/usr/bin/env bash | |
| # List all dependencies, the released installed and the time the package of that release was uploaded to artifactory | |
| dependencies=`cat <(jq -r '.devDependencies | keys[]' package.json) <(jq -r '.dependencies | keys[]' package.json)` | |
| for dependency in $dependencies | |
| do | |
| version=`jq -r .dependencies.\"$dependency\".version package-lock.json` | |
| time=`npm show $dependency --json | jq -r .time.\"$version\"` | |
| echo $dependency $version $time | |
| done |
Some comparison between geo related data files: https://www.gaia-gis.it/fossil/libspatialite/wiki?name=Supporting+GeoJSON
Some explanation: https://wiki.openstreetmap.org/wiki/Tiles
In webgl.html is presented a method that loads an array of 16 bits unsigned values representing grayscale intensities being processed through a LUT. An javascript implementation is provided for reference.
In webgl2.html adds the handling of signed data in addition to unsigned data and using integer texture.