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
  • 06:14 (UTC +01:00)
View GitHub Profile
@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();
@meza
meza / simpleTest.test.js
Created March 20, 2019 23:47
False Positive test
const functionUnderTest = (input) => {
return "I'm a teapot"
}
describe('Simple test', () => {
it('Expects something to happen', () => {
const config = {
veryImportant: 'setting'
};
const result = functionUnderTest(config);
Fatal error: [File:H:\SVN_Ark\Engine\Source\Developer\MessageLog\Private\Model\MessageLogListingModel.cpp] [Line: 70]
Critical Error BaseHumanAnimBP_Fists_C /Game/Maps/UEDPIE_1_TestMapArea.TestMapArea:PersistentLevel.PlayerPawnTest_Male_C_0.CharacterMesh0.BaseHumanAnimBP_Fists_C_2 Object from PIE level still referenced. Shortest path from root: BaseHumanAnimBP_Fists_C /Game/Maps/UEDPIE_1_TestMapArea.TestMapArea:PersistentLevel.PlayerPawnTest_Male_C_0.CharacterMesh0.BaseHumanAnimBP_Fists_C_2 [target]
SkeletalMeshComponent /Game/Maps/UEDPIE_1_TestMapArea.TestMapArea:PersistentLevel.PlayerPawnTest_Male_C_0.CharacterMesh0 (ObjectProperty /Script/Engine.SkeletalMeshComponent:AnimScriptInstance)
PlayerPawnTest_Male_C /Game/Maps/UEDPIE_1_TestMapArea.TestMapArea:PersistentLevel.PlayerPawnTest_Male_C_0 (ObjectProperty /Script/Engine.Character:Mesh)
Level /Game/Maps/UEDPIE_1_TestMapArea.TestMapArea:PersistentLevel (ObjectProperty /Script/UMG.PanelSlot:Content)
World /Game/Maps/UEDPIE_1_TestMapArea.Te
@meza
meza / READEM.md
Last active August 29, 2015 14:06
Ubuntu configuration for PAcker

Place the preseed.cfg into a directory named http, so your file structure would look like this:

/

  • http
    • preseed.cgf
  • box.json