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 / bunnycdn_api.js
Last active March 28, 2024 16:44
BunnyCDN API PUT for NodeJS. Use startUploading function to start the uploading process of all files in a directory.
var request = require('request');
var fs = require('fs');
function uploadItem(item) {
console.log('uploading ' + item);
request({
method: 'PUT',
preambleCRLF: true,
postambleCRLF: true,
uri: 'https://storage.bunnycdn.com/newagetest//path/filename',
@erfg12
erfg12 / fix.md
Last active December 3, 2023 23:14
PCSX2 Snowblind games fix (v1.5.0-dev-2640+)

Games list

  • Champions of Norrath (both games)
  • Baldur's Gate: Dark Alliance

Make game run at consistent frame rate

  • Plugin/Bios Selector > GPU > (select) GSdx * SSE4
  • Video (GS) > Plugin Settings... > (tick) Enable HW Hacks
  • Video (GS) > Plugin Settings... > Advanced Settings and Hacks > (tick) Fast Texture Invalidation
  • Video (GS) > Plugin Settings... > Advanced Settings and Hacks > Skipdraw Range > 1 - 4 (only for underpowered PCs)
@erfg12
erfg12 / readme.md
Created May 9, 2023 03:06
Build and Debug C app in Windows

pre-req:

  • 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"
@erfg12
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;

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"
@erfg12
erfg12 / gotify_web_sample.html
Last active September 20, 2022 20:10
Gotify web app sample code for send and receive.
<html>
<header>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script>
// VARIABLES, PLEASE CHANGE
var APP_TOKEN = "AhCGJ-BEC3z.g8Q";
var CLIENT_TOKEN = "C25iT7U7E1xlzSk";
var GOTIFY_SERVER = "localhost:80";
// SEND INFO TO MSG SERVER

Follow kos-setup-easy.md first.

sudo apt install unrar
git clone https://github.com/ianmicheal/SDL-dreamhal--GLDC.git
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://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos
cd /opt/toolchains/dc/kos/utils/dc-chain
sh download.sh
sh unpack.sh
make
@erfg12
erfg12 / client.html
Last active July 6, 2022 20:45
RSS --> JS (CORS bypass)
<body>
<!-- host this on GitHub.com pages for free -->
<div id="DisplayData"></div>
<script>
fetch('https://cnet-rss-cors.herokuapp.com/')
.then(response => response.text())
.then(data => {
parser = new DOMParser();
xmlDoc = parser.parseFromString(data, "text/xml");
@erfg12
erfg12 / eqemu_singleplayer_db_changes
Last active May 26, 2022 13:31
EQEmu Single Player DB Changes Recommended
DB: rule_values
_FEATURES_
- Remove corpse retrieving
- Remove experience loss upon death
- Remove unmemorize spells upon death
- Higher HP/MANA/STA regen
- Soul bind anywhere
- Reduce NPC running away at low HP
- Higher hit chance