Skip to content

Instantly share code, notes, and snippets.

View erfg12's full-sized avatar
Working from home

Jacob Fliss erfg12

Working from home
View GitHub Profile
erfg12 / main.cpp
Created May 11, 2023 16:39
[Episode 9] [Code] First OpenGL Triangle - Modern OpenGL - Mike Shah
#include <SDL.h>
#include <glad/glad.h>
#include <iostream>
#include <vector>
int gScreenWidth = 640;
int gScreenHeight = 480;
int quit = 0;
erfg12 /
Created May 9, 2023 03:06
Build and Debug C app in Windows


  • install VS
  • add VS's "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\Hostx64\x64" to system environment Path var

to build:

  • type "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars32"
  • type "cl -Zi test.c user32.lib gdi32.lib"

to debug:

  • type "/devenv /debugexe ./test.exe"

For Ubuntu (WSL)

Setup your system environment variables:

rm ~/.profile
echo >>~/.profile "export PS2DEV=$HOME/ps2dev"
echo >>~/.profile "export PS2SDK=\$PS2DEV/ps2sdk"
echo >>~/.profile "export GSKIT=\$PS2DEV/gsKit"
echo >>~/.profile "export PATH=\$PATH:\$PROGRAMFILES/Git/bin"
echo &gt;&gt;~/.profile "export PATH=\$PATH:\$PROGRAMFILES/Mercurial"

Follow first.

sudo apt install unrar
git clone
cp "SDL-dreamhal--GLDC-main/Precompiled libs/*.a" "/opt/toolchains/dc/kos/addons/lib/dreamcast/"
unrar x "SDL-dreamhal--GLDC-main/Precompiled libs/include.rar" "/opt/toolchains/dc/kos/addons/include/"

On Linux (Ubuntu) (WSL for Windows)

sudo mkdir /opt/toolchains/dc
sudo chown -R YOUR_USERNAME_HERE /opt/toolchains/dc
sudo chmod -R ugo+rwx /opt/toolchains/dc
git clone git:// /opt/toolchains/dc/kos
cd /opt/toolchains/dc/kos/utils/dc-chain
erfg12 / client.html
Last active July 6, 2022 20:45
RSS --> JS (CORS bypass)
<!-- host this on pages for free -->
<div id="DisplayData"></div>
.then(response => response.text())
.then(data => {
parser = new DOMParser();
xmlDoc = parser.parseFromString(data, "text/xml");
erfg12 / Makefile
Created April 6, 2022 20:27
Programming Games in C/C++ on DOS
obj = main.obj
bin = main.exe
CC = wcc
CFLAGS = -zq
LD = wlink
$(bin): $(obj)
$(LD) name $@ file { $(obj) }
erfg12 /
Last active January 7, 2022 07:12
Old Console Streaming

Stream Original Xbox



  1. Plug the OGX360 into your Xbox controller slot, plug in a USB cable from your game console into the Titan Two's Output port. The Program port's USB cable should plug into your PC.
  2. Plug in your Xbox video to the HDMI input hardware.
erfg12 / plotPDF.scr
Last active August 24, 2021 14:55
AutoCAD script file to convert DXF or DWG files to PDF. Run with accoreconsole.exe in AutoCAD directory. Works with AutoCAD LT.
; C:\Program Files\Autodesk\AutoCAD LT 2021\accoreconsole.exe /i "FILE_PATH_HERE\test.dwg" /s "FILE_PATH_HERE\plotPDF.scr"
; This example script file expects there to be a `Layout1` layout for each file.
DWG To PDF.pc3
ANSI full bleed A (8.50 x 11.00 Inches)
erfg12 / makefile
Created August 16, 2021 18:08
C GCC makefile
# [Windows] Install MinGW (, add C:\MinGW\bin to Environment Variables PATH. Run command mingw32-make
# [MacOS]
# [Ubuntu] "sudo apt install build-essential"
CC = "gcc"
LDFLAGS = -lgdi32
src = $(wildcard *.c)