This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* package.json: | |
| { | |
| "name": "sgr_demo", | |
| "version": "1.0.0", | |
| "description": "TS-port of https://abdullin.com/schema-guided-reasoning/demo", | |
| "scripts": { | |
| "start": "bun src/sgr.ts" | |
| }, | |
| "keywords": [], | |
| "author": "[email protected]", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const isArray = (x: any): x is Array<any> => | |
| Array.isArray(x); | |
| const isObject = (x: any): x is Object => | |
| x !== null && typeof x === 'object' && !(x instanceof Date || x instanceof Number || x instanceof String); | |
| type ReduceRecursiveCb<OUT, IN> = (acc: OUT, x, path: Array<string | number>, source: IN, parent) => OUT; | |
| export const reduceRecursive = <OUT, IN = any>(fn: ReduceRecursiveCb<OUT, IN>) => | |
| (initialValue: OUT, input: any, path: Array<string | number> = [], source: IN = input, parent?: any): OUT => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| apt-get update | |
| apt-get install wget curl nginx | |
| echo "1. INSTALLING PHP" | |
| apt-get install php7.3 | |
| apt-get install php7.3-fpm | |
| sed -i /etc/nginx/sites-available/default 's/^[\t ]*index index.html/index index.html index.php/' /etc/nginx/sites-available/default | |
| echo "2. INSTALLING GEOIP" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |