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 / chat_server.js
Last active February 26, 2019 16:47
NodeJS chat server with commands and null terminator.
var net = require('net');
var PORT = 13000;
var clients = [];
net.createServer(function(sock) {
console.log('CONNECTED: ' + sock.remoteAddress +':'+ sock.remotePort);
sock.name = "";
clients.push(sock);
@erfg12
erfg12 / matrix_chart_csv.php
Last active April 9, 2019 17:59
Cross reference a CSV (excel) file (column by row) for a value
<?PHP
// Get value from matrix chart. H = first column going down, W = first row across
function getValueFromCSV($h, $w) {
$v = 0;
$k = 0;
$row = 0;
if (($handle = fopen("test.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 100, ",")) !== FALSE) {
$key = array_search($w, $data, true);
if ($key != null && $row == 0)
@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 = "";
@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 / 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.

@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 / 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) {
@erfg12
erfg12 / ML.NET Obj. Recognition.md
Last active April 2, 2020 19:02
Machine Learning for object recognition in image
@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 / 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
});
});