Skip to content

Instantly share code, notes, and snippets.

View saltybeagle's full-sized avatar

Brett Bieber saltybeagle

View GitHub Profile
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
@saltybeagle
saltybeagle / test.php
Created August 30, 2012 16:42 — forked from mfairchild365/test.php
Simple, configureable and lightweight Spam Detector
<?php
$spamChecker = new SpamChecker();
$spamChecker->addRule(function($spam){
if (strpos($spam, 'test') !== false) {
return true;
}
});
echo "The following should be true" . PHP_EOL;
var_dump($spamChecker->isSpam('this is a test'));
@saltybeagle
saltybeagle / reproduce_pyrus_make.sh
Created August 7, 2011 15:01 — forked from Tyrael/reproduce_pyrus_make.sh
reproduce pyrus make
#!/bin/bash
mkdir 'reproduce_pyrus_make';
cd 'reproduce_pyrus_make';
git clone 'git://github.com/pyrus/Pyrus.git';
git clone 'git://github.com/pyrus/Pyrus_Developer.git';
git clone 'git://github.com/pear2/PEAR2_Autoload.git';
git clone 'git://github.com/Tyrael/suhosin.git';
cd 'Pyrus';
cd 'data';
ln -s ../../Pyrus_Developer/customcommand/commands.xml local-developer-commands.xml