Skip to content

Instantly share code, notes, and snippets.

David Pennington Xeoncross

Block or report user

Report or block Xeoncross

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Lazy.php
* Trait Lazy
* Allows for lazy initialization of object and class values.
* Example:
* class Test {
View BootstrapForm.php
* Helper Class to output correct Twitter Bootstrap Markup.
* Only option for now is the horizontal Form.
* Usage :
$form = new BootstrapForm('add_user');
$form->addInput('text-input', 'user_name', 'Your name:', true);
Xeoncross / typeahead.usage.html
Created Feb 17, 2014
twitter typeahead.js plugin example usage
View typeahead.usage.html
<!-- -->
<input type="text" autocomplete="off" class="form-control"
<input type="hidden" id="client-id" name="client-id">
View address-lookup
#!/usr/bin/php -q
* Returns tab-delimited latitude,longitude,formatted address for given address from Google Maps API
* @author Warren Stevens (
$base = '';
View TestFrameworkInATweet.php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}
View base58.php
class base58
static public $alphabet = "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ";
public static function encode($int) {
$base58_string = "";
$base = strlen(self::$alphabet);
while($int >= $base) {
View gist:9256851
for( $a=1; $a<20; $a++ ) {
echo '----------------------' . PHP_EOL;
echo 'PROJECT_ID :: ' . $a . PHP_EOL;
$last = $c[ 'predis' ]->get( 'round-robin-dispatch' );
$i = $j = -1;
$n = count( $array );
View domtemplate.php
//DOM Templating classes v7 © copyright (cc-by) Kroc Camen 2012
//you may do whatever you want with this code as long as you give credit
//documentation at
class DOMTemplate extends DOMTemplateNode {
private $DOMDocument;
private $keep_prolog = false;
Xeoncross / Controller\HomeController.php
Created Mar 13, 2014
Simple HTTP REST Controller wrapper for Silex based on
View Controller\HomeController.php
namespace Controller;
class HomeController
public function getAction($app)
return 'Hello!';
View facebook-sample.php
* A simple Facebook PHP example.
* - This is not a "Facebook SDK".
* - This example uses Curl, Hash, JSON, Session extensions.
* - This does not use the JavaScript SDK, nor the cookie set by it.
* - This works with Canvas, Page Tabs with IFrames, the Registration Plugin
* and with any other flow which uses the signed_request.
You can’t perform that action at this time.