Skip to content

Instantly share code, notes, and snippets.

Avatar

Matt McFarland MattMcFarland

  • Software Engineer
  • Dayton, OH
View GitHub Profile
@MattMcFarland
MattMcFarland / readme.md
Last active Dec 1, 2020
Run X4 Foundations in debug mode with timestamped file names so you don't lose them.
View readme.md

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.

View time-travel.md

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
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 https://medium.com/@docodemore/an-alternative-to-operator-mono-font-6e5d040e1c7e#.nk01drf9k
// 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
xem / readme.md
Last active Mar 30, 2021
Maths & trigonometry cheat sheet for 2D & 3D games
View readme.md

Conventions

  • 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
zachhanson94 / LiveCoding Instructions
Created Jul 11, 2015
Instructions to setup external streaming and chatting for livecoding.tv 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
infostreams / gogs
Created Sep 22, 2014
Debian startup (init.d) script for gogs.io
View gogs
#! /bin/sh
### BEGIN INIT INFO
# 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
### END INIT INFO
@natelandau
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
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
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
shime / _readme.md
Last active Nov 8, 2020 — forked from ryin/tmux_local_install.sh
installation script for tmux 1.9a
View _readme.md

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.

Prerequisities

  • gcc