A snippet that allows securly modifying the .htaccess file
Remeber to replace your-plugin with the id of your plugin
| /* | |
| NOTE: | |
| - The metadata of the current module "module" in ESM is under "import.meta" | |
| - Dynamic import is always async, meaning you need to await it | |
| - Also if you export default it's under .default, no longer returned directly | |
| */ |
| 'use strict' | |
| // go to https://takeout.google.com/settings/takeout | |
| // Create new export | |
| // Select chrome | |
| // Download the export | |
| // Extract it and run this script in the folder (you can directly run from node REPL) | |
| const history = require('./Takeout/Chrome/BrowserHistory.json') |
| #!/usr/bin/env/bash | |
| # launch as "setup-ubuntu-container.sh <container-name>" | |
| # replace "maciej" with your username and you're good to go | |
| # NOTE: this assumes you're UID 1000 on your local system, otherwise this script needs tweaks | |
| set -exuo pipefail | |
| NAME="$1" |
| curl -fsSL https://deb.nodesource.com/setup_14.x | bash - | |
| apt install -y nodejs | |
| apt update | |
| wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && sudo dpkg -i erlang-solutions_2.0_all.deb | |
| apt update | |
| apt install esl-erlang elixir -y | |
| apt install postgresql -y |
| with (import ./. {}); | |
| let | |
| lotusSrc = fetchFromGitHub { | |
| owner = "filecoin-project"; | |
| repo = "lotus"; | |
| # master (nix-prefetch-github filecoin-project lotus --fetch-submodules --nix) | |
| rev = "95e47cf9982c1c3538f4de8037ca5476cbaedab0"; | |
| sha256 = "lZmVYqs6wVzT0om8fvpDrP5pFDIYJZnZmQHM+RsP25I="; | |
| fetchSubmodules = true; |
A snippet that allows securly modifying the .htaccess file
Remeber to replace your-plugin with the id of your plugin
| // ib = input base | |
| // ob = output base | |
| // n = number to convert | |
| // r = leftover from division | |
| // o = output number | |
| // x = exponent (base ^ position) | |
| function roxn(ib, ob, n) { | |
| let x = 1 | |
| let o = 0 |
| 'use strict' | |
| const query = "& (= a 'test') (= b 'test')" | |
| const query2 = "and(equals(a, 'test'), equals(b, 'test'))" | |
| function parseTokens1 (tokens) { | |
| let i = 0 | |
| let block = 'exprLeft' | |
| let stack = [] |