This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* A simple class for tracking execution times of PHP scripts and logging them into CVS files | |
* @author Bernhard Häussner | |
* @see https://gist.github.com/846504 | |
*/ | |
class Profile { | |
private $_start = array(); | |
private $_subdata = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* People API - Example Code | |
* | |
* @author icyleaf <icyleaf.cn@gmail.com> | |
* @link http://icyleaf.com | |
* @version 0.1 | |
*/ | |
class Controller_API_People extends Controller_REST { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Quickly assemled rest controller based on Kohana 3's Kohana_Controller_REST | |
* https://github.com/kohana/core/blob/3.1%2Fmaster/classes/kohana/controller/rest.php | |
* | |
* Added functionality from FuelPHP's Controller_Rest | |
* https://github.com/fuel/fuel/blob/develop/fuel/core/classes/controller/rest.php | |
* | |
* All credits to Kohana and FuelPHP teams! | |
* Jonas Nyström - cambiata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Test controller extending Controller_Cambiata_REST | |
* Jonas Nyström - cambiata | |
* | |
* To be used with a route like this one: | |
* | |
* Route::set('rest', 'rest(/<par1>(/<par2>(/<par3>(/<par4>(/<par5>)))))(.<format>)') | |
* ->defaults(array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Attempt to wrap Http Authentication into a separate class... | |
* | |
* Ideas and some code from FuelPHP Controller_Rest | |
* https://github.com/fuel/fuel/blob/develop/fuel/core/classes/controller/rest.php | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct access allowed.'); | |
/** | |
* Ajax Template Controller template | |
* | |
* @author Sergei Gladkovskiy <smgladkovskiy@gmail.com> | |
*/ | |
abstract class Controller_Ajax_Template extends Controller { | |
protected $_auth_required = FALSE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
Route::set('cms', function($uri) { | |
$is_empty = empty($uri); | |
$does_exists = class_exists('Controller_' . $uri); | |
if ($is_empty || $does_exists) { | |
$default_route = Route::get('default'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Author: Ngo Minh Nam | |
$dir = "/path/to/your/repo/"; | |
$output = array(); | |
chdir($dir); | |
// Linux | |
exec("git log",$output); | |
// Windows | |
exec('"C:\Program Files (x86)\Git\bin\git.exe" ' ."log", $output); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Orginally by cginzel at the Sencha Forums | |
http://www.sencha.com/forum/member.php?20865-cginzel | |
I'm playing with NodeJS and Connect which has an JSONRPC provider and so I managed to coble this proxy and reader together that I was able to successfully use to retrieve data into a grid. But I'm moving onto building an Ext.Direct provider instead so it'll be easier to build out the GUI. But for posterity's sake, I thought I'd post this code here just in case anyone else might find it useful. | |
I don't intend to support it, so use it at your own risk! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in $(find $1 -iname "*.wsp"); do | |
if [ -a $f ]; | |
then /opt/graphite/bin/whisper-set-aggregation-method.py $f max; | |
fi; | |
done |
OlderNewer