Skip to content

Instantly share code, notes, and snippets.

View mattj1's full-sized avatar

Matt Johnson mattj1

View GitHub Profile
go outside, get some sunshine, eat healthy, exercise
don't buy Made in China
question the mainstream media
Twitter isn't real life.
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Xml;
using System.Xml.Serialization;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using MonoGame.Extended.Tiled.Serialization;
# https://github.com/mobile-shell/mosh/issues/403
kill `pidof mosh-server`
Vector2 GetWindowDPI(void)
{
float xdpi = 1.0;
float ydpi = 1.0;
#if defined(PLATFORM_DESKTOP)
Vector2 windowPos = GetWindowPosition();
int monitorCount;
# Slow. Should use something like this instead https://www.geeksforgeeks.org/largest-rectangle-under-histogram/
rows, cols = (8, 8)
arr = [[0]*cols]*rows
arr[0] = [0, 0, 0, 0, 0, 0, 0, 0]
arr[1] = [0, 1, 0, 1, 1, 0, 1, 0]
arr[2] = [0, 1, 0, 1, 1, 0, 1, 0]
arr[3] = [0, 1, 0, 1, 1, 0, 1, 0]
arr[4] = [0, 1, 0, 1, 1, 0, 1, 0]
arr[5] = [0, 1, 0, 0, 0, 0, 1, 0]
@mattj1
mattj1 / gist:f0a3c6c898e0480435eee0c6673f4444
Last active June 20, 2022 22:14
Spectre VR multiplayer modes as explained in the Spectre CD cutscenes
DM/FFA mode
------------------
* Arena
* Strafe City (NGV7QTST.AVI)
- Arena (DM) but in the air
* Super Arena
- Includes teleport gates and "submergers" (probably up/down transports)
* Cyber Dogfight (NGV12QTC.AVI)
- Has flight pickups
from PIL import Image, ImageFont, ImageDraw
image = Image.new('RGB', (32 * 8, 16 * 16))
draw = ImageDraw.Draw(image)
font = ImageFont.truetype("Px437_IBM_VGA9.ttf", 16)
for i in range(1, 256):
col = i % 32