View gist:31445
/**
* A Simple HTTP POST/GET Helper Class for Groovy
*
* @author Tony Landis
* @copyright 2007 Tony Landis
* @website http://www.tonylandis.com
* @license BSD License (http://www.opensource.org/licenses/bsd-license.php)
* @example h = new GroovyHTTP('http://www.google.com/search')
* h.setMethod('GET')
* h.setParam('q', 'groovy')
View smarty.function.soap.php
<?php
/**
* Smarty {soap} plugin
*
* Type: function<br>
* Name: soap<br>
* Purpose: post http data and display results from soap webservice
* Params: url, post(true/false - passes along orig params), assign,
* Usage: {soap assign=soapResponse
* endpoint=http://www.site.com/search.soap
View pdo-adodb-singleton-refactor.class.php
<?php
/**
* PDO SINGLETON CLASS, ADODB ENABLED
*
* @author Tony Landis
* @link http://www.tonylandis.com
* @license Use how you like it, just please don't remove or alter this PHPDoc
*/
class sdb
{
View php-to-text-table-example.php
<?php
$data = array(
array('company'=>'AIG', 'id'=>1, 'balance'=> '-$99,999,999,999.00'),
array('company'=>'Wachovia', 'id'=>2, 'balance'=> '-$10,000,000.00'),
array('company'=>'HP', 'id'=>3, 'balance'=> '$555,000.000.00'),
array('company'=>'IBM', 'id'=>4, 'balance'=> '$12,000.00')
);
$renderer = new ArrayToTextTable($data);
View pdo-vs-adodb-benchmark.php
<?php
#Quick and dirty PDO vs ADOdb benchmark
#PDO benchmark script:
$db = new PDO("mysql:dbname=logs;host=127.0.0.1", "root", "");
$rs = $db->query("select * from ses limit 10")->fetchAll(PDO::FETCH_ASSOC);
foreach($rs as $r) {}
#ADOdb benchmark script
View agilegallery.lzx.xml
<!--
AgileGallery Source Code
Author: Tony Landis
Link: http://www.agilegallery.com
Link: http://www.tonylandis.com
License: GPL
Restrictions: Free for personal/commerical use, the link/credit must remain intact and visible
-->
<?xml version="1.0" encoding="UTF-8"?>
View gist:33018
cache_path = "/var/www/site/tmp"
cache_code = "compile"
-- render and cache to the filesystem
function cache_gen()
lighty.env["physical.path"] = lighty.env["physical.doc-root"] .. "/index.php"
lighty.env["uri.query"] = "p=" .. string.gsub(lighty.env["uri.path"], "\.(htm|html)$", "")
--print ("CACHE: " .. lighty.env["uri.query"])
end
View gist:33019
<?php
require "../includes/smarty/Smarty.class.php";
$smarty = new Smarty;
$smarty->template_dir = 'templates';
$smarty->compile_dir = 'compile';
$smarty->cache_dir = '/var/www/site/tmp';
$smarty->caching = true;
$smarty->force_compile = true;
View gist:40145
/**
* Provides a drop down field with multiple checkboxes
* @author Tony Landis http://www.tonylandis.com/
* @copyright Free for all use and modification. The author and copyright must be remain intact here.
*
* @class Ext.form.MultiSelectField
* @extends Ext.form.TriggerField
*/
Ext.form.MultiSelectField = Ext.extend(Ext.form.TriggerField, {
triggerClass: 'x-form-trigger',
View asterisk-voicemail-send.php
#!/usr/bin/php -q
<?php
/**
* ASTERISK PBX VOICEMAIL MAILER
*
* @author Tony Landis
* @link http://www.tonylandis.com
* @license Use how you like it, just please don't remove or alter this PHPDoc
*/