Skip to content

Instantly share code, notes, and snippets.

@zvineyard
zvineyard / gist:3594863
Created September 2, 2012 04:37
SQL: Transaction Log for authorize.net
CREATE TABLE IF NOT EXISTS `transaction_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pid` int(11) NOT NULL,
`response_code` int(11) NOT NULL,
`payment_data` text NOT NULL,
`response_data` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
@zvineyard
zvineyard / gist:3594872
Created September 2, 2012 04:41
HTML: Authorize.net Basic Form
<?php
if(isset($_POST['run'])) {
include('payment_validation.php');
}
?>
<form action="" method="post" name="payment" onsubmit="document.getElementById('submit_button').disabled = 1;">
<p><input name="page_id" type="hidden" value="4" /></p>
<p><label>First Name</label><input name="first_name" type="text" /></p>
<p><label>Last Name</label><input name="last_name" type="text" /></p>
<p><label>Comments</label><textarea name="comments"></textarea></p>
@zvineyard
zvineyard / gist:3594939
Created September 2, 2012 05:01
PHP: Barfy Old Authorize.net Procedural PHP Gross
<?php
$required_fields = array(
'page_id' => 'page_id',
'Amount' => 'cc_amount',
'Credit Card Number' => 'cc_card_num',
'Credit Card Expiration Date' => 'cc_exp_date',
'Description' => 'cc_description'
);
@zvineyard
zvineyard / gist:3595004
Created September 2, 2012 05:14
PHP: Barfy Old Authorize.net Procedural PHP Gateway Gross
<?php
// Settings
$post_url = "https://test.authorize.net/gateway/transact.dll";
$db_host = "localhost";
$db_user = "root";
$db_pass = "";
$db_name = "payments";
$db_table = "transaction_log";
@zvineyard
zvineyard / gist:3746612
Created September 18, 2012 23:06
CSS: Target IE9 Only
:root #element-id {
margin: 40px\9;
}
@zvineyard
zvineyard / content_element_menu
Created December 14, 2012 22:26
TypoScript: Menu of Content Elements
temp.contentnav = CONTENT
temp.contentnav.wrap = <ul>|</ul>
temp.contentnav {
table = tt_content
select {
pidInList = this
andWhere = (sectionIndex=1 AND hidden=0 AND deleted=0)
orderBy = sorting DESC
where = colPos=0
languageField=sys_language_uid
@zvineyard
zvineyard / Pipe Delimited US States
Last active March 18, 2021 16:14
Pipe delimited list of US state abbreviations.
AL|AK|AZ|AR|CA|CO|CT|DE|FL|GA|HI|ID|IL|IN|IA|KS|KY|LA|ME|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|OH|OK|OR|PA|RI|SC|SD|TN|TX|UT|VT|VA|WA|WV|WI|WY
@zvineyard
zvineyard / model.js
Created April 30, 2013 22:28
The basics of a custom Titanium model.
function Model() {
this.init = function() {
alert('model init');
}
}
module.exports = function() {
return new Model();
@zvineyard
zvineyard / nnu_grad_degrees.js
Last active December 17, 2015 07:58
A JavaScript array of the graduate degrees offered by NNU.
var grad_degrees = new Array(
"EDS - Director of Special Education: Exceptional Child",
"EDS - Dirirector of Special Education: Education Leadership",
"EDS - Educational Leadership: Superintendent",
"EDS - Educational Leadership: Building Administrator",
"EDD - Educational Leadership",
"MA - Christian Education",
"MA - Missional Leadership",
"MA - Pastoral Ministry",
"MA - Spiritual Formation",
@zvineyard
zvineyard / nnu_undergrad_degrees.js
Created May 14, 2013 14:17
A JavaScript array of the undergraduate majors offered by NNU.
var majors = new Array(
"Accounting",
"Applied Studies",
"Art",
"Biblical Studies",
"Biology",
"Business Administration",
"Chemistry",
"Christian Ministry",
"Communication",