I found this berried online, and figured a gist would be a good place for it.
HowTo
here is a quick howto: I am assuming ~/py/lib as the directory in this example
cd ~/py/lib
git clone git://gist.github.com/1617045.git sidereal
| <?php | |
| /** | |
| * @author : Dennis T Kaplan | |
| * | |
| * @version : 1.0 | |
| * Date : June 17, 2007 | |
| * Function : reverse strstr() | |
| * Purpose : Returns part of haystack string from start to the first occurrence of needle | |
| * $haystack = 'this/that/whatever'; | |
| * $result = rstrstr($haystack, '/') |
| <?php | |
| /** | |
| * Description Add a directory to the php include path | |
| * | |
| * @package TaMeR | |
| * @category File | |
| * @type Function | |
| * @author Dennis T Kaplan | |
| * @copyright (C) 2009-2011 Dennis T Kaplan | |
| * @license GPL {@link http://www.gnu.org/licenses/gpl.html} |
| <?php | |
| /** | |
| * An open source application development framework for PHP | |
| * | |
| * @category RoboTaMeR | |
| * @author Dennis T Kaplan | |
| * @copyright Copyright (c) 2008 - 2011, Dennis T Kaplan | |
| * @license http://RoboTamer.com/license.html | |
| * @link http://RoboTamer.com | |
| */ |
| <?php | |
| /** | |
| * An open source application development framework for PHP | |
| * | |
| * @category RoboTaMeR | |
| * @author Dennis T Kaplan | |
| * @copyright Copyright (c) 2008 - 2011, Dennis T Kaplan | |
| * @license http://RoboTamer.com/license.html | |
| * @link http://RoboTamer.com | |
| */ |
| #! /bin/bash | |
| PATH=/sbin:/usr/sbin:/bin:/usr/bin | |
| . /lib/lsb/init-functions | |
| export FILE=/etc/network/interfaces | |
| case "$1" in | |
| start) | |
| SLEEPFOR=1200 |
| # | |
| # dtuple.py: Database Tuple handling | |
| # | |
| # Written by Greg Stein. Public Domain. | |
| # No Copyright, no Rights Reserved, and no Warranties. | |
| # | |
| # This module is maintained by Greg and is available at: | |
| # http://www.lyra.org/greg/python/dtuple.py | |
| # | |
| # Some discussion/usage of this module can be found at: |
I found this berried online, and figured a gist would be a good place for it.
HowTo
here is a quick howto: I am assuming ~/py/lib as the directory in this example
cd ~/py/lib
git clone git://gist.github.com/1617045.git sidereal
| <?php | |
| class Msg { | |
| public static $msgss = array(); | |
| /** | |
| * Add a message to the message array (adds to the user's session) | |
| * @param string $type You can have several types of messages, these are class names for Bootstrap's messaging classes, usually, info, error, success, warning | |
| * @param string $message The message you want to add to the list |
| <?php | |
| # Adds your library to the beginning of the php include path | |
| addInclude('~/code/libs', FALSE); | |
| $loader = new SplClassLoader(); | |
| # adds the php include path to the class | |
| $loader->setIncludePathLookup(true); | |
| $loader->add('Zend'); |
| <?php | |
| /** | |
| * | |
| * @param string $dir | |
| * @return array | |
| */ | |
| function get_php_files_in_dir($dir) | |
| { | |
| $bin = array (); |