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 / wp_cors.php
Last active August 11, 2020 18:31
3rd Party WordPress CORS
<?php
$WPSite = "https://WordPressSite.com"; // CHANGE THIS
// Make CORS accessible
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
error_reporting(E_ALL);
// Pull data via Curl
function GetURLData($url) {
@erfg12
erfg12 / 3ds_unity.md
Last active June 10, 2020 14:56
3DS Homebrew Development With Unity

Troubleshooting

  • Pink Images: Size restriction issue. 1024 w/h max.
  • White/Corrupted Images: Out of vram. Compress PNG images, resize smaller than 400x240 and use 8-bit coloring.
  • White 3D Texturing: Shaders are incompatible. Do not use Default shaders. Use Sprites/Default shaders.
  • Citra Memory errors (game crashing): Model Light & Reflection Probes, and Cast Shadows should be disabled.
  • FBI Install, no game appears: Check to ensure your application ID is unique. (Ex: 0x48300 would be unique)
  • Citra Memory Errors Immediately upon scene startup: You may have a sprite renderer using too large PNG image.
  • Only Display1-10 instead of Lower LCD, Upper LCD: Go to Build Settings > N3DS > press the Switch Platform button.
  • Camera set to Lower LCD, but canvas doesn't show: Change Target Display on the canvas to Lower LCD.
@erfg12
erfg12 / demo.js
Last active May 15, 2020 15:48
Convert Wordpress /feed/ XML to JSON and make CORS
// This uses jQuery! Get it at https://code.jquery.com
$(document).ready(function () {
$.ajax({
url: 'https://Website.com/wp-feed-xml-2-json.php',
type: 'GET',
dataType: "json",
success: DisplayAllOps
});
});
@erfg12
erfg12 / index.html
Created April 16, 2020 17:16
Simple PWA Maker
<head>
<link rel="manifest" href="/manifest.json" />
</head>
<body>
<script>
if ("serviceWorker" in navigator) {
window.addEventListener("load", () => {
navigator.serviceWorker.register("/pwabuilder-sw.js").then((reg) => {
console.log("Service worker registered.", reg);
@erfg12
erfg12 / ML.NET Obj. Recognition.md
Last active April 2, 2020 19:02
Machine Learning for object recognition in image
@erfg12
erfg12 / iteration.gml
Last active February 16, 2020 01:56
Iterate through a string, explode by commas.
// Iterate through a string, explode by commas.
text = argument0;
char_string = 0;
if string_pos(",", text) != 0
{
var cc = string_count(",",text);
for (i = 0; i <= cc; i += 1) {
if (i < cc) {
@ECHO OFF
REM This is for GIMX cable and ULTRAGRID video stream
SET GIMX_PATH=C:\Program Files\GIMX
SET ULTRAGRID_PATH=C:\Users\jake\Desktop\UltraGrid
SET HOST_IP=192.168.0.0
SET GIMX_USBPORT=COM3
SET HDMI_INPUT=idk
SET GIMX_CONF=X360Pad
@erfg12
erfg12 / tutorial.md
Last active September 27, 2019 20:13
Download waybackmachine.org Websites

Method 1

  1. Get wayback machine proxy software - https://github.com/STRML/wayback-machine-machine

  2. Configure proxy software, and setup proxy on your OS. Run proxy software.

  3. If using Windows, get WGet software - https://eternallybored.org/misc/wget/

  4. Open a command/terminal window in the directory you want to download the site to, use this command:

    wget -r -np -e use_proxy=yes -e http_proxy=127.0.0.1:4080 -k http://www.mywaybackmachinewebsite.com

NOTE: If you want, visit the website first to make sure it's exactly what you want prior to download. WGet will download whatever your browser sees.

@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
@erfg12
erfg12 / patreon.php
Last active January 23, 2021 16:33
Patreon API PHP Example
<?php
require __DIR__ . '/vendor/autoload.php';
use Patreon\API;
use Patreon\OAuth;
// get client_id, client_secret, redirect_uri and creator_token from https://www.patreon.com/portal/registration/register-clients
$client_id = "";
$client_secret = "";
$redirect_uri = "";
$creator_token = "";