Skip to content

Instantly share code, notes, and snippets.

View joshtronic's full-sized avatar
🐢
🐢 🐢 🐢

Josh Sherman joshtronic

🐢
🐢 🐢 🐢
View GitHub Profile
<?php
$parameters = array (
'actionID' => 'GetSamples',
'parameters' => array (
array('date_start' => $date_range_start),
array('date_end' => $date_range_end)
),
'UserName' => $this->getSoapUsername(),
'Password' => $this->getSoapPassword()
<?php
require_once 'pickles.php';
$db = new Database('mysql');
...
<?php
$image = new Imagick();
$image->readImageBlob($svg_data);
$image->setImageFormat('png24');
header('Content-type: image/png');
ob_clean();
echo $image->getImageBlob();
//Default settings
$.fn.nivoSlider.defaults = {
effect:'random',
slices:15,
animSpeed:500,
pauseTime:3000,
startSlide:0,
directionNav:true,
directionNavHide:true,
controlNav:true,
/**
* JJ Slider (jQuery Slideshow) Plug-In
*
* http://github.com/joshtronic/jquery.jjslider
*
* Author: Josh Sherman <[email protected]>
* Copyright (c) 2010 Gravity Boulevard, LLC
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
/**
* JJ Slider (jQuery Slideshow) Plug-In
*
* http://github.com/joshtronic/jquery.jjslider
*
* Author: Josh Sherman <[email protected]>
* Copyright (c) 2010 Gravity Boulevard, LLC
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
@joshtronic
joshtronic / gist:701343
Created November 16, 2010 02:40
geocode example
<?php
$response = file_get_contents('http://maps.google.com/maps/api/geocode/json?address=' . $address . '&sensor=false&key=' . $config->google['maps']);
?>
@joshtronic
joshtronic / gist:709385
Created November 22, 2010 01:12
PICKLES Security Config
<?php
$config = array(
'pickles' => array(
'security' => array(
'login' => 'login', // Login module, loaded inline when user doesn't have access
'table' => 'users', // Name of the user table that holds the user's access
'column' => 'access', // Name of the column in the aforementioned table that holds the user's access level
'levels' => array(
10 => 'USER',
@joshtronic
joshtronic / gist:714874
Created November 25, 2010 03:49
arrayToXML
<?
/**
* Array to XML
*
* Converts an array into XML tags (recursive).
*
* @access private
* @param array $array array to convert into XML
* @return string generated XML
*/
<?
/**
* Array to XML
*
* Converts an array into XML tags (recursive). This method expects the
* passed array to be formatted very specifically to accomodate the fact
* that an array's format isn't quite the same as well-formed XML.
*
* Input Array =
* array('children' => array(