Skip to content

Instantly share code, notes, and snippets.

View meza's full-sized avatar
👋
tweet me if I missed a PR

Meza meza

👋
tweet me if I missed a PR
  • London, United Kingdom
View GitHub Profile
@meza
meza / Coding Agent Config
Created November 14, 2025 23:12
Use this in your `AGENTS.md` or `copilot-instructions,md` or similar. It works best if it's for an Agent that runs on your computer. If it's a cloud based one, the Working Memory instructions might not be as useful
## Persona
You must inhabit the role described in this file: https://raw.githubusercontent.com/meza/agent-docs/refs/heads/main/Engineer.md
You must make all attempts to acquire it and incorporate it into your responses.
## Bob's Working Memory
- Maintain session-to-session context in `bob-memory.md` (kept at the repo root).
- At the start of each session, skim the most recent entries to refresh open threads and outstanding follow-ups.
- As new facts, decisions, edge cases, or follow-ups emerge, jot them down immediately—do not wait for the session to end.

After a bit of a hectic few days I managed to get basic gametests running.

I followed the primer and it got more and more clear with every new readthrough.

The primer has an ExampleTestInstance which is the E2ETests file of mine. This is extremely ugly for neo 1.21.5 but it proves the point. A TestInstance (yarn) which is the equivalent of GameTestInstance in mojmap is a "single test". Its start method is the body of the test. Since my E2ETests class is an old test for a different setup, it just now acts as a runner of my old tests but it does the trick - kinda. I don't recommend this in the long run but it's a good step in my refactoring.

Now this `TestInst

@meza
meza / test-invsort-config.json
Last active April 5, 2025 17:56
A test config file for the inventory sorter mod
{
"preventSortForScreens": [],
"hideButtonsForScreens": [
"minecraft:shulker_box"
]
}
@meza
meza / Game.ini
Created January 28, 2022 01:49
If you're moving from a singleplayer Atlas world where you had the UseSinglePlayerSettings turned on to a server where you don't want it to be turned on, it can be a problem. In normal circumstances it puts your character in a skill deficit. These are the EXACT points you gain per level in Single Player
[/Script/ShooterGame.ShooterGameMode]
bUseSingleplayerSettings=False
OverridePlayerLevelEngramPoints=8
OverridePlayerLevelEngramPoints=8
OverridePlayerLevelEngramPoints=8
OverridePlayerLevelEngramPoints=8
OverridePlayerLevelEngramPoints=8
OverridePlayerLevelEngramPoints=8
@meza
meza / expressToLambda.js
Created February 5, 2020 22:08
Map express to lambda
export const mapFromLambda = (lambdaResponse, expressResponse) => {
expressResponse.status(lambdaResponse.statusCode);
if (lambdaResponse.headers) {
Object.keys(lambdaResponse.headers).forEach((headerName) => {
expressResponse.setHeader(headerName, lambdaResponse.headers[headerName]);
});
}
expressResponse.send(lambdaResponse.body);
};
// old
// import Chance from 'chance';
// const chance = new Chance();
//new
import { chance } from 'jest-chance';
{
...,
"jest" : {
...,
"globalSetup": "./testSetup.js"
}
}
@meza
meza / testSetup.js
Created March 22, 2019 09:58
Test setup for random seed
const Chance = require("chance")
module.exports = function () {
const chance = new Chance()
if (!process.env.CHANCE_SEED) {
process.env.CHANCE_SEED = chance.hash()
}
console.log(`Using Chance Seed: ${process.env.CHANCE_SEED}`)
}
import Chance from 'chance';
const seedGenerator = new Chance()
const seed = process.env.SEED || seedGenerator.hash();
const chance = new Chance(seed);
const functionUnderTest = (input) => {
return input.veryImportant
}
@meza
meza / randomTest.test.js
Created March 21, 2019 00:06
Randomised test
import Chance from 'chance';
const chance = new Chance();
const functionUnderTest = (input) => {
return input.veryImportant
}
describe('Simple test', () => {
it('Expects something to happen', () => {
const inputString = chance.string();