Skip to content

Instantly share code, notes, and snippets.

View MattMcFarland's full-sized avatar

Matt McFarland MattMcFarland

  • Software Engineer
  • Dayton, OH
View GitHub Profile
@MattMcFarland
MattMcFarland / xml
Last active December 30, 2023 08:28
RimGPT Personas
<personas>
<li>
<name>Simon</name>
<azureVoice>en-US-DavisNeural</azureVoice>
<azureVoiceStyleDegree>0.3</azureVoiceStyleDegree>
<speechRate>0.07</speechRate>
<speechPitch>-0.01</speechPitch>
<phrasesLimit>100</phrasesLimit>
<phraseBatchSize>100</phraseBatchSize>
<phraseDelayMin>1200</phraseDelayMin>
@MattMcFarland
MattMcFarland / readme.md
Last active August 1, 2023 10:11
Run X4 Foundations in debug mode with timestamped file names so you don't lose them.

Run X4 Foundations in debug mode.

The handy script below (x4-debug.bat) can be used as a shortcut to start x4 in debug mode. You get:

  • All debug messages turned on
  • All debug logs sent to a timestamped file, so you dont lose anything

Setup

Copy paste the code in the file below, then update the value for X4_EXE_PATH - change it to wherever X4.exe is located.

@MattMcFarland
MattMcFarland / 3-col-design.md
Last active April 18, 2023 08:48
3 column design

3 Column Design

Just a fast guide to applying a 3 column layout using HTML and CSS3.

the <span> method:

This is my personal favorite..

@MattMcFarland
MattMcFarland / styles.less
Created July 15, 2016 17:00
Ligature fonts for atom
atom-text-editor {
font-family: 'Fira Code';
font-style: normal;
text-rendering: optimizeLegibility;
}
atom-text-editor::shadow {
.string.quoted,
.string.regexp {
-webkit-font-feature-settings: "liga" off, "calt" off;
}

Adding a new ware

Please consider every mentioning of {WARE_ID} to be replaced of what ware we want to add, and it must be lowercase to ensure compatibility across systems. Generally, we will be prefixing every ware we add with something unqiue to avoid any collision issues with other mods. This is mentioned as {PREFIX}

UPDATE: you can simplify this process by automating majority of the work using this tool.

Create new assets

To add a ware and the production of the ware to the game, the following files need to be created from scratch:

@MattMcFarland
MattMcFarland / jsverify jasmine.js
Last active October 29, 2018 14:44
js verify with jasmine
describe('Maths', () => {
it('addition is commutative', () => {
expect(jsc.checkForall(jsc.integer, jsc.integer, (a, b) => a + b === b + a)).toBeTrue()
})
})
@MattMcFarland
MattMcFarland / with mocha.js
Last active March 10, 2018 19:47
jsverify with mocha
describe('Maths', () => {
it('addition is commutative', () => {
jsc.assertForall(jsc.integer, jsc.integer, (a, b) => a + b === b + a)
// same as:
assert(jsc.checkForall(jsc.integer, jsc.integer, (a, b) => a + b === b + a) === true)
})
})
@MattMcFarland
MattMcFarland / Create a tree with path string.js
Created June 30, 2017 20:55
Create a tree with path string created by MattMcFarland - https://repl.it/JC8r/22
const pathString = 'one/two/three';
function buildTree(pathString) {
const pathArray = pathString.split('/')
let pathList = {}
for (var i = pathArray.length - 1; i >= 0; i--) {
let newObj = Object.assign({}, pathList);
pathList = {
[pathArray[i]]: newObj
@MattMcFarland
MattMcFarland / random-dungeon.lua
Created April 21, 2017 20:53
pico8 - random dungeon
-- Copyright(c) Matt McFarland - 2017
-- MIT LICENSE
-- This will create rooms using the BSP method
rooms = {}
function _init()
local main_container = container(0, 6, 127, 121)
local max_depth = 6
local container_tree = split_container(main_container, max_depth)