Skip to content

Instantly share code, notes, and snippets.

View xeoncross's full-sized avatar

David Pennington xeoncross

View GitHub Profile
package httpclient
import (
"net"
"net/http"
"time"
)
type Config struct {
ConnectTimeout time.Duration
<?php
require_once('attachment.class.php');
/**
* Fast Mime Mail parser Class using PHP's MailParse Extension
* @author gabe@fijiwebdesign.com
* @url http://www.fijiwebdesign.com/
* @license http://creativecommons.org/licenses/by-sa/3.0/us/
* @version $Id$
</php
/**
* Facebook Page Feed Parser
*
* @using cURL
*/
function fb_parse_feed( $page_id, $no = 5 ) {
// URL to the Facebook page's RSS feed.
@xeoncross
xeoncross / ocp.php
Created April 14, 2014 18:07 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
class SSLSocket {
public $s = null;
public $on_err = null;
public $on_read = null;
public $on_readComplete = null;
public $on_timeout = null;
public $on_write = null;
public $endpoint = null;
public $wbuffer = array();
public $timer = null;
{
"require": {
"php": ">=5.5.0",
"christiaan/stream-process": "1.0.*",
"mkraemer/react-inotify": "dev-master",
"mkraemer/react-pcntl": "dev-master"
}
}
<?php
/**
* A class wrapper for PECL Libevent [http://www.php.net/manual/en/book.libevent.php]
* @author Paul Thrasher [http://paulthrasher.com/] 1/17/11
**/
/**
* // an example func that just exits
* function handler_func($fd, $events, $arg){ $arg[1]->loopexit(); };
<?php
if(isset($_GET['success'])){
echo 'done';
exit;
}
$policy = base64_encode(str_replace(array("\r","\n"),"",'{ "expiration": "2023-01-01T12:00:00.000Z", "conditions": [
{"acl": "public-read" },
{"bucket": "MYBUCKET" },
@xeoncross
xeoncross / http.php
Created April 21, 2014 17:21 — forked from volca/http.php
<?php
function http_get($host) {
// create event base
$base_fd = event_base_new();
// create a new event
$event_fd = event_new();
// resource to be monitored
<?php
require_once('attachment.class.php');
/**
* Fast Mime Mail parser Class using PHP's MailParse Extension
* @author gabe@fijiwebdesign.com
* @url http://www.fijiwebdesign.com/
* @license http://creativecommons.org/licenses/by-sa/3.0/us/
* @version $Id$