Skip to content

Instantly share code, notes, and snippets.

View Ericgi231's full-sized avatar

Eric Grant Ericgi231

View GitHub Profile
@Ericgi231
Ericgi231 / ericgi231.me.htaccess
Last active September 5, 2025 21:26
The htaccess file used for my sites routing, handles redirecting ais and cleaning api paths
# -------------------------------
# ericgi231.me
# -------------------------------
RewriteEngine On
Options -MultiViews
# --- Handle routing apis ---
# Try PHP
RewriteCond /var/www/php-api/$1.php -f
@Ericgi231
Ericgi231 / Files_To_MySQL_Table.php
Created August 19, 2025 21:41
A small php script to create a MySQL table containing all files in a folder. It expects that a database already exists and will prompt you for database login info executed.
<?php
echo "Server:\n";
$servername = trim(fgets(STDIN));
echo "User:\n";
$username = trim(fgets(STDIN));
echo "Password:\n";
$password = trim(fgets(STDIN));
echo "Database:\n";
$dbname = trim(fgets(STDIN));
echo "Table:\n";
@Ericgi231
Ericgi231 / BluePrince_FamilyCoreSolver.py
Created August 19, 2025 21:39
Simple python solution to solve the Family Core puzzle in the game Blue Prince.
WORDS = ["pigs","sand","mail","date","head","clam","peak","heat","joya","well","toad","card","will","tape","legs","tree","road","maid","slab","rock","hand","vase","safe","clay","toes"]
def char_to_int(char):
return ord(char) - ord('a') + 1
def int_to_char(num):
return chr(num + ord('a') - 1)
def find_core():
base_nums = []
@Ericgi231
Ericgi231 / NYTConnectionsDailyArt.user.js
Last active August 22, 2025 18:58
A Tampermonkey script that adds the daily New York Times Connections art to the main game page instead of hiding it in the hints page.
// ==UserScript==
// @name Add daily art to NYT Connections
// @namespace http://tampermonkey.net/
// @version 2025-08-19
// @description Adds the NYT Connections daily art from the hint page to the main game page.
// @author Eric Grant
// @match https://www.nytimes.com/games/connections
// @match https://www.nytimes.com/games/connections/*
// @require https://code.jquery.com/jquery-3.7.0.min.js
// @connect nytimes.com