Skip to content

Instantly share code, notes, and snippets.

@tristar500
tristar500 / gist:1439655
Created December 6, 2011 19:50
PHP5 OOP Basics
http://phpduck.com/oop-basics-in-php-5/
http://www.elated.com/articles/object-oriented-php-for-absolute-beginners/
http://www.elated.com/articles/object-oriented-php-autoloading-serializing-and-querying-objects/
http://www.elated.com/articles/object-oriented-php-delving-deeper-into-properties-and-methods/
@tristar500
tristar500 / gist:1439833
Created December 6, 2011 20:28
PHP Paypal Integration
http://hungred.com/how-to/integrate-paypal-express-checkout-solution/
http://leepeng.blogspot.com/2006/04/standard-paypal-php-integration.html
@tristar500
tristar500 / gist:1440055
Created December 6, 2011 21:19
CodeIgniter TCPDF
http://codeigniter.com/wiki/TCPDF-CodeIgniter_Integration
@tristar500
tristar500 / gist:1445209
Created December 7, 2011 23:09
Months and days arrays
var months = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
var shortdays = new Array('Sun','Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat');
var longdays = new Array('Sunday','Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
@tristar500
tristar500 / gist:1445915
Created December 8, 2011 02:55
paypal returned data
$saveArray = array(
'mc_gross' => $_POST['mc_gross'],
'protection_eligibility' => $_POST['protection_eligibility'],
'address_status' => $_POST['address_status'],
'payer_id' => $_POST['payer_id'],
'tax' => $_POST['tax'],
'address_street' => $_POST['address_street'],
'payment_date' => $_POST['payment_date'],
'payment_status' => $_POST['payment_status'],
'charset' => $_POST['charset'],
@tristar500
tristar500 / gist:1469137
Created December 12, 2011 21:15
PHP good to know stuff
http://net.tutsplus.com/tutorials/php/9-useful-php-functions-and-features-you-need-to-know/
@tristar500
tristar500 / gist:1879236
Created February 21, 2012 21:52
Vertical jQuery Text Scroller
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>vTicker</title>
<meta name="description" content=" " />
<meta name="keywords" content=" " />
<style type="text/css" media="all">
@tristar500
tristar500 / debug_helper
Created March 18, 2012 19:45
Debug Helper
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// --------------------------------------------------------------------
if(!function_exists('vardump'))
{
function vardump($text='',$theVar)
{
echo '<pre>';
echo $text . ': ';
var_dump($theVar);
@tristar500
tristar500 / logs_helper.php
Created March 18, 2012 19:47
Log File Helper
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
// --------------------------------------------------------------------
if ( ! function_exists('log_entry'))
{
// adds the $message to $the_log
function log_entry($the_log, $message)
{
$myPath = $_SERVER['DOCUMENT_ROOT'].'/system/logs/';
<?php
/**
* Return the return the word with inital caps
*
* @access public
* @param string the word
* @return string
*/
if(!function_exists('pdf_file_name'))