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
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
erfg12 / .cpanel.yml
Last active January 11, 2022 20:53
cpanel git commit to public_html
---
deployment:
tasks:
- export DEPLOYPATH=/home/ACCOUNT/public_html/
- /bin/cp -u -r * $DEPLOYPATH
- /bin/cp .htaccess $DEPLOYPATH
@erfg12
erfg12 / Retro_Console_Streaming.md
Last active January 7, 2022 07:12
Old Console Streaming

Stream Original Xbox

REQUIRED HARDWARE:

INSTRUCTIONS:

  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.
Bioshock 3D - https://archive.org/details/bioshock3d
Doom RPG - https://archive.org/details/doomrpg_brew
Pac-Mania - https://archive.org/details/arcade_pacmania
Orcs & Elves - https://archive.org/details/orcsandelves_brew
Need For Speed Most Wanted - https://archive.org/details/nfsmw_202107
Need For Speed Underground 2 - https://archive.org/details/nfsu2mobile
Ratchet and Clank - https://mega.nz/file/bOQz2ART#oPD8E_bqtHcHZKV6mGqoW-sscP4XqKRd6b0mDipLnuw
Random Games - https://archive.org/details/qualcomm-brew-games
Contra 4 Redux - https://mega.nz/file/3bgRnSxS#uxMukrqGvn5YxZKVU4BAs09OZAWNvKY1OHJmiQ8-Ldk
@erfg12
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.
_PLOT
_Y
Layout1
DWG To PDF.pc3
ANSI full bleed A (8.50 x 11.00 Inches)
_Inches
_Landscape
_No
@erfg12
erfg12 / makefile
Created August 16, 2021 18:08
C GCC makefile
# [Windows] Install MinGW (https://sourceforge.net/projects/mingw), add C:\MinGW\bin to Environment Variables PATH. Run command mingw32-make
# [MacOS] https://discussions.apple.com/thread/5250041
# [Ubuntu] "sudo apt install build-essential"
EXECUTABLE = main
CC = "gcc"
LDFLAGS = -lgdi32
src = $(wildcard *.c)

RIGHT CLICK ON OpenSSL.exe AND RUN AS ADMIN

req -x509 -nodes -new -sha256 -days 1024 -newkey rsa:2048 -keyout RootCA.key -out RootCA.pem -subj "/C=US/CN=Example-Root-CA"

x509 -outform pem -in RootCA.pem -out RootCA.crt

MOVE RootCA.key > backend\message\certificates\private.key
MOVE RootCA.crt > backend\message\certificates\certificate.crt
MOVE RootCA.pem > frontend\cert.pem
@erfg12
erfg12 / Firebase_Forum_Functions.ts
Last active May 30, 2021 21:27
Firebase forum system functions.
// ABOUT: These are functions for a Firebase forum system.
// You need NodeJS (nodejs.org) installed on your dev PC and create an Algolia and firebase project.
// Create an empty folder.
// Open terminal/cmd, navigate to the new folder and type in (NOTE: Use TypeScript):
// npm install -g firebase-tools
// firebase login
// firebase init
// npm install algoliasearch --save
// firebase functions:config:set algolia.appid="YOUR_APP_ID" algolia.apikey="YOUR_API_KEY"
@erfg12
erfg12 / node_express_post.js
Last active March 25, 2021 14:47
Simple Node.JS Express post parsing without Body-Parser.
// Post data to `http://(host):(port)/handle` in JSON format.
var express = require("express");
//var WebSocket = require('ws');
//var sqlite3 = require("sqlite3").verbose();
var app = express();
app.use(express.json());
app.use(express.urlencoded({ extended: true }))
// Can change path to '/node/api/handle' to support iisnode.
<html>
<head>
<script
src="https://cdn.jsdelivr.net/npm/instantsearch.js@2.8.1"></script>
<script src="https://cdn.jsdelivr.net/npm/algoliasearch@4.5.1/dist/algoliasearch.umd.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.8.1/dist/instantsearch.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/instantsearch.js@2.8.1/dist/instantsearch-theme-algolia.min.css">
</head>
<body>