Skip to content

Instantly share code, notes, and snippets.

View shanept's full-sized avatar

Shane Thompson shanept

View GitHub Profile
@shanept
shanept / PHPMailer Wrapper for Contact Forms.php
Last active March 7, 2024 19:36
Provides a simple PHP mailer wrapper for contact foms.
<?php
/**
* Ensure you define the following constants - for example:
*
* define('SMTP_FROM', 'noreply@example.com');
* define('MAIL_TO', 'rcpt@example.com');
*
* // If using SMTP transport:
* define('SMTP_HOST', 'smtp.example.com');
* define('SMTP_PORT', '25'); // 25, 465, 587, 2525 are common options
@shanept
shanept / ChatGPT.md
Created March 25, 2024 09:57
ChatGPT 3.5 training commands

ChatGPT Training command

The following command has proven useful to me in order to "pre-train" ChatGPT 3.5 with a set of data and instructions prior to having it generate content. It is not fool proof, but it works well enough for my needs.

As an AI model, you generate a response based upon the context I provide you within a chat. Today we are going to
behave a little differently. Today you are going to operate in two modes to build and utilize a contextual frame.

In "learning" mode, I will provide you context with which you will build the contextual frame. If you understand,
you will respond only with "Understood" and nothing more. If you do not understand you are permitted to question

until you understand.

@shanept
shanept / Autoloader.php
Created March 26, 2024 14:03
PSR-4 compatible Autoloader
<?php
namespace shanept;
/**
* A simple, case-insensitive autoloader for use in PHP projects.
*/
class AutoLoader
{
private $fs_basepath;