Skip to content

Instantly share code, notes, and snippets.

@treehousetim
treehousetim / TextTable.php
Last active April 18, 2019 21:04 — forked from dapepe/TextTable.php
Class to generate a Markdown-style table from a PHP array
<?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
*/
@treehousetim
treehousetim / rs_exclude.txt
Last active January 5, 2019 15:49
rsync example
._*
.DS_Store
.svn
/publish
<?
//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 August 29, 2015 14:18
Streaming JSON to browser using PHP for large record sets of repeating rows
<?
// 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 August 20, 2012 18:56 — forked from RobThree/SoapClientTimeout.class.php
PHP SoapClient with timeout
<?
// 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