Made this to help me extract Chat GPT logs, for future reference.
Chat GPT did help in helping me write this :)
- Go to Chat GPT
- Type some questions
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
const MongoClient = require('mongodb').MongoClient; | |
const assert = require('assert'); | |
exports.findInCollection = ({ db, collectionName }) => query => { | |
assert.notEqual(db, undefined); | |
const collection = db.collection(collectionName); | |
return collection.find(query).toArray(); | |
}; |
const isWinner = ({ score, totalScore }) => score >= totalScore; | |
const playMachine = Machine({ | |
id: "play", | |
initial: "playing", | |
context: { | |
score: 0, | |
totalScore: 10 | |
}, | |
states: { |
HELLO_FILE_NAME := ".hello" | |
tidy-hello: | |
-rm $(HELLO_FILE_NAME) | |
save-hello: tidy-hello write-to-hello | |
write-to-hello: | |
echo "save this hello" > $(HELLO_FILE_NAME) |
// For 2 spaces + semi colons | |
{ | |
"editor.formatOnSave": true, | |
"editor.tabSize": 2, | |
"files.exclude": { | |
"node_modules": true | |
}, | |
"prettier.semi": true, | |
"prettier.tabWidth": 2, | |
"prettier.useTabs": false, |