Skip to content

Instantly share code, notes, and snippets.


Matt McFarland MattMcFarland

  • Software Engineer
  • Dayton, OH
View GitHub Profile
MattMcFarland /
Last active Dec 1, 2020
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


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


Time Travel Debugging

Time Travel refers to the ability to record a tab and later replay it ([WebReplay][wrr]). The technology is useful for local development, where you might want to:

  • pause and step forwards or backwards
  • pause and rewind to a prior state
  • rewind to the time a console message was logged
  • rewind to the time an element had a certain style or layout
  • rewind to the time a network asset loaded
ramidem / Atom Theme
Created Feb 16, 2017
I love looking at @wesbos' Theme for sublime text. So, I made my own.
View Atom Theme
// This theme is based on
// I am using Cobalt2 for the Syntax Theme and One Dark for the UI Theme.
atom-text-editor {
font-family: 'Fira Code';
font-style: normal;
text-rendering: optimizeLegibility;
atom-text-editor::shadow {
xem /
Last active Mar 30, 2021
Maths & trigonometry cheat sheet for 2D & 3D games


  • A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
  • lengths are in any unit (ex: pixels)
  • code snippets are in JavaScript

Degrees to radians

angleRad = angleDeg * Math.PI / 180;

zachhanson94 / LiveCoding Instructions
Created Jul 11, 2015
Instructions to setup external streaming and chatting for streams
View LiveCoding Instructions
// ************** Instructions for connecting to the LiveCoding chatrooms from a 3rd party application. ****************
Step 1a (Ubuntu/ any OS with aptitude (aka apt-get)) :
sudo apt-add-repository ppa:rsrchboy/profanity && sudo apt-get update
apt-get install profanity
Step 1b (OSX w/ homebrew):
$ brew install profanity
infostreams / gogs
Created Sep 22, 2014
Debian startup (init.d) script for
View gogs
#! /bin/sh
# Provides: gogs
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Git repository manager Gogs
# Description: Starts and stops the self-hosted git repository manager Gogs
natelandau / .bash_profile
Last active Apr 28, 2021
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
# Description: This file holds all my BASH configurations and aliases
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
Xeoncross / ajax.js
Last active Apr 21, 2021
Simple, cross-browser Javascript POST/GET xhr request object. Supports request data and proper AJAX headers.
View ajax.js
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object
* @param string url
* @param object callback
* @param mixed data
* @param null x
function ajax(url, callback, data, x) {
try {
langhard / model-user.js
Last active Sep 2, 2020
Node.js, Passport, SequelizeJS, LocalStrategy, crypto (md5)
View model-user.js
/** *********************************************************
* API - Model - User
********************************************************* */
module.exports = function (sequelize, DataTypes) {
return sequelize.define('User', {
username: DataTypes.STRING,
password: DataTypes.STRING,
firstName: DataTypes.STRING,
lastName: DataTypes.STRING,
shime /
Last active Nov 8, 2020 — forked from ryin/
installation script for tmux 1.9a

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.


  • gcc