diff --git a/build-compress.sh b/build-compress.sh new file mode 100755 index 0000000..c1d32fa --- /dev/null +++ b/build-compress.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +set -e +set -o pipefail + +cd "$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" + +do_compress () { + find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec zopfli {} \; + find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec brotli -v -f -9 -o {}.br {} \; + #find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec zstd -v -f -19 -o {}.zst {} \; +} + +do_compress challenge/ +do_compress assets/ \ No newline at end of file diff --git a/build.sh b/build-wasm.sh similarity index 57% rename from build.sh rename to build-wasm.sh index b342086..8287574 100755 --- a/build.sh +++ b/build-wasm.sh @@ -29,13 +29,4 @@ export PATH="$PATH:$(realpath ./build/release/tinygo/bin/)" popd -go generate ./... - -do_compress () { - find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec zopfli {} \; - find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec brotli -v -f -9 -o {}.br {} \; - #find "$1" \( -type f -name "*.wasm" -o -name "*.css" -o -name "*.js" -o -name "*.mjs" \) -exec zstd -v -f -19 -o {}.zst {} \; -} - -do_compress challenge/ -do_compress assets/ \ No newline at end of file +go generate ./... \ No newline at end of file diff --git a/challenge/js-pow-sha256/runtime/.gitignore b/challenge/js-pow-sha256/runtime/.gitignore deleted file mode 100644 index 917660a..0000000 --- a/challenge/js-pow-sha256/runtime/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.wasm \ No newline at end of file diff --git a/challenge/js-pow-sha256/runtime/runtime.wasm b/challenge/js-pow-sha256/runtime/runtime.wasm new file mode 100644 index 0000000..d68cbd7 Binary files /dev/null and b/challenge/js-pow-sha256/runtime/runtime.wasm differ diff --git a/policy.yml b/policy.yml index e5d24cb..3da6629 100644 --- a/policy.yml +++ b/policy.yml @@ -262,6 +262,7 @@ rules: - name: homesite conditions: - 'path == "/"' + # generic /*/*/ match gave too many options for scrapers to trigger random endpoints - 'path.matches("(?i)^/(WeebDataHoarder|P2Pool|mirror|git|S\\.O\\.N\\.G|FM10K|Sillycom|pwgen2155|kaitou|metonym)/[^/]+$")' action: pass