List of SAX parsers on npm
Up to date search: https://npms.io/search?q=sax+parser
List of SAX parsers on npm
Up to date search: https://npms.io/search?q=sax+parser
| git pull | |
| nvm i | |
| npm ci | |
| npm ls --parseable --depth 0 | wc -l | |
| npm ls --parseable | wc -l | |
| npm ls --parseable --depth 0 --production | wc -l | |
| npm ls --parseable --production | wc -l |
| // Source: https://gist.github.com/karfau/b6d0927628f6662ca6d892153562522f | |
| // 1. copy this file to your root directory alongside ormconfig.env | |
| // in your package.json scripts/mocha.opts, etc add | |
| // --reqister ./ormconfig.register.js | |
| // or | |
| // -r ./ormconfig.register.js | |
| const {config} = require('dotenv'); | |
| const path = require('path'); | |
| config({path: path.join(__dirname, 'ormconfig.env')}); |
| # With my local setup in Manjaro I'm using https://podman.io/ as a rootless docker replacement: | |
| # https://podman.io/getting-started/installation#arch-linux--manjaro-linux | |
| # To be able to still run the real docker when required, but use podman by default I added this link: | |
| # /usr/local/bin/docker -> /usr/bin/podman | |
| # I wanted to have an easy way to switch to real docker and back so I created the following aliases: | |
| # <name>su switches on <name>, un<name> switches off <name> | |
| # since the tools all require docker daemon to run and calling 'sudo <name>', | |
| # but most scripts assume it works wihtout sudo | |
| # docker |
| // requires lodash being present as _, e.g. in the dev console on https://lodash.com/docs | |
| // random | |
| var result = []; for (i=0;i<50;i++) {let a = `${_.sample.call(null, _.range(2, 21))} * ${_.sample.call(null, _.range(2, 16))}`; result.push(`${a} = ${eval(a)}`);} console.log(result.join('\n')) | |
| // all ordered | |
| var result = []; for (i=1;i<21;i++) { for (j=1;j<11;j++) { let a = `${i} * ${j}`; result.push(`${a} = ${eval(a)}`);}} console.log(result.join('\n')) |
| /logs |
| type Neighbors = {neighbors: number}; | |
| type State = Neighbors & {alive: boolean}; | |
| function deadCell({neighbors}: Neighbors): State { | |
| return {alive: false, neighbors}; | |
| } | |
| function livingCell({neighbors}: Neighbors): State { | |
| return {alive: true, neighbors}; | |
| } |
Described here: https://learn.getgrav.org/cookbook/twig-recipes#displaying-a-translated-month
put this file into user/languages of your site (create if it doesn't exist).
enables names of dates translated to german by appending |t.
example:
| var C_TYPE = 'Type', | |
| C_TITLE = 'Title', | |
| C_ID = 'ID', | |
| C_URL = 'URL', | |
| C_MIME_TYPE = 'file type', | |
| C_ELEMENTS = 'elements in document'; | |
| var HEADERS = [C_TYPE, C_TITLE, C_ID, C_URL, C_MIME_TYPE, C_ELEMENTS]; | |
| function onOpen(){ |