Skip to content

Instantly share code, notes, and snippets.

@skunkbad
skunkbad / Code for UniqueIdeaMan
Created September 4, 2017 15:42
Code for UniqueIdeaMan
<?php
/*
ERROR HANDLING
*/
//declare(strict_types=1);
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
@skunkbad
skunkbad / Tunnel.php
Created February 18, 2017 09:06
Attempt to use an SSH tunnel to connect to MySQL on a remote host
<?php
/***
Based off code from:
https://www.experts-exchange.com/questions/26619790/Connect-to-Mysql-through-PHP-ssh2-tunnel.html
Example usage: User/Pass Based Auth MySQL Proxy
-----------------------------------------------
$user_pass_config = array(
'user' => 'username',
'pass' => 'password',
@skunkbad
skunkbad / tvsc_main_template.html
Created September 21, 2012 08:10
MailChimp - TVSC Main Template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Facebook sharing information tags -->
<meta property="og:title" content="*|MC:SUBJECT|*">
<title>*|MC:SUBJECT|*</title>
<style type="text/css">
#outlook a{ padding:0; }
body{ width:100% !important; }
@skunkbad
skunkbad / jquery.label-classes.js
Created August 27, 2012 22:12
jQuery Form Label Classes For Checkboxes and Radio Buttons
/**
* jQuery Form Label Classes For Checkboxes and Radio Buttons
*
* Plugin adds classes to labels of checkboxes and radio buttons depending on
* whether the element is checked or is in focus. Aids in the application of using
* images to replace the actual form elements.
*
* Plugin Author: Robert B Gottier
* Author Website: brianswebdesign.com
* Author Screenname: skunkbad
@skunkbad
skunkbad / MY_Controller.php
Created December 20, 2011 22:31
CodeIgniter 2.1.0 form validation external callbacks
<?php if( ! defined('BASEPATH') ) exit('No direct script access allowed');
/**
* CodeIgniter 2.1.0 form validation external callbacks.
*
* This is part of MY_Controller.php in Community Auth, which is an open
* source authentication application for CodeIgniter 2.1.0
*
* @package Community Auth
* @author Robert B Gottier
* @copyright Copyright (c) 2011, Robert B Gottier.
@skunkbad
skunkbad / MY_Upload.php
Created September 15, 2011 07:01
CodeIgniter Upload class extension for FTP or Database storage
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Upload extends CI_Upload {
public $destination_not_file_system = FALSE;
public function __construct($props = array())
{
parent::__construct();