Skip to content

Instantly share code, notes, and snippets.

Avatar
☺️

Tim Gallagher treehousetim

☺️
View GitHub Profile
@treehousetim
treehousetim / TextTable.php
Last active Apr 18, 2019 — forked from dapepe/TextTable.php
Class to generate a Markdown-style table from a PHP array
View TextTable.php
<?php
//https://gist.github.com/dapepe/9956717
/**
* Creates a markdown document based on the parsed documentation
*
* @author Peter-Christoph Haider <peter.haider@zeyon.net>
* @package Apidoc
* @version 1.00 (2014-04-04)
* @license GNU Lesser Public License
*/
View rs_exclude.txt
._*
.DS_Store
.svn
/publish
View example.php
<?
//http://treehousetim.com/2011/12/13/hiding-values-in-urls-using-php/
header( 'content-type: text/plain' );
$h = '';
if ( array_key_exists( 'h', $_GET ) && ! empty( $_GET['h'] ) )
{
$test = unserialize( gzuncompress( base64_decode( urldecode( urldecode( $_GET['h'] ) ) ) ) );
if ( is_array( $test ) )
{
@treehousetim
treehousetim / example.php
Last active Aug 29, 2015
Streaming JSON to browser using PHP for large record sets of repeating rows
View example.php
<?
// COPYRIGHT 2015 by TIM GALLGHER (treehousetim@gmail.com)
// http://treehousetim.com/2015/04/08/new-json-streaming-output-code/
//The MIT License (MIT)
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
@treehousetim
treehousetim / soapTimeout.php
Created Aug 20, 2012 — forked from RobThree/SoapClientTimeout.class.php
PHP SoapClient with timeout
View soapTimeout.php
<?
// https://gist.github.com/gists/3406693
// Drop-in replacement for PHP's SoapClient class supporting connect and response/transfer timeout
// Usage: Exactly as PHP's SoapClient class, except that 3 new options are available:
// timeout The response/transfer timeout in milliseconds; 0 == default SoapClient / CURL timeout
// connecttimeout The connection timeout; 0 == default SoapClient / CURL timeout
// sslverifypeer FALSE to stop SoapClient from verifying the peer's certificate
// 2012-08-20 - treehousetim added an additional option to support xignite.com api key auth