Skip to content

Instantly share code, notes, and snippets.

View jlengstorf's full-sized avatar
💭
partyin

Jason Lengstorf jlengstorf

💭
partyin
View GitHub Profile
<?php
class TrainRider
{
static $num_riders = 0;
public $times_ridden = 0;
public function rideTrain()
{
<?php
$args = array(
'post_type' => 'post',
'numberposts' => -1,
'post_status' => null,
'cat' => 4
);
$everything = get_posts($args);
if ($everything):
echo '<ul>';
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:SmartPointsIntf-ISmartPoints"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:UpdateCustomer>
<svID xsi:type="xsd:string">AAAE1EE8-8435-4447-9918-4DCDADA1F551</svID>
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:NS2="urn:ISmartPoints1">
<NS1:UpdateCustomer xmlns:NS1="urn:SmartPointsIntf-ISmartPoints">
<svID xsi:type="xsd:string">45DF95E2-175F-452C-A648-FBA2D197FBF4</svID>
<CTCustNo xsi:type="xsd:string">1859</CTCustNo>
<?php
$client = new SoapClient(
"https://www.clix.ca/scripts/ismartpoints.wsdl",
array(
'exceptions'=>true,
'trace'=>1,
'cache_wsdl'=>WSDL_CACHE_NONE
)
);
@jlengstorf
jlengstorf / gist:2403279
Created April 17, 2012 03:44
Increase PHP File Upload Size via .htaccess
# Allows larger file uploads
php_value upload_max_filesize 20M
php_value post_max_size 20M
@jlengstorf
jlengstorf / style.css
Created April 21, 2012 21:23
Basic template for a child WP theme
/*
Theme Name: CHILD_THEME_NAME
Theme URI: http://www.copterlabs.com/
Description: Custom WordPress theme for CLIENT_OR_PROJECT_NAME
Author: Copter Labs
Author URI: http://www.copterlabs.com/
Template: rotorwash
Version: 1.0
*/
@jlengstorf
jlengstorf / gist:2555001
Created April 30, 2012 02:30
Placeholder fallback using Modernizr
// check placeholder browser support
if( !Modernizr.input.placeholder )
{
$(this).find('[placeholder]').each(function() {
if( $(this).val() == '' ) // if field is empty
{
$(this).val( $(this).attr('placeholder') );
}
});
@jlengstorf
jlengstorf / gist:2605871
Created May 5, 2012 22:04
VeriSign SSL Seal
<script type="text/javascript" src="https://seal.verisign.com/getseal?host_name=voteright.com&amp;size=S&amp;use_flash=NO&amp;use_transparent=YES&amp;lang=en"></script>
@jlengstorf
jlengstorf / gist:2713566
Created May 16, 2012 20:11
Adds a query string so that modifying the stylesheet requires a style update.
<?php
$stylesheet = get_bloginfo( 'stylesheet_url' ) . '?'
. filemtime( get_stylesheet_directory() . '/style.css');
?>
<link rel="stylesheet" type="text/css" media="all"
href="<?php echo $stylesheet; ?>" />