I love the new GitHub issues, here are some ideas to make it perfect, ordered by priority:
This file contains hidden or 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 | |
class A { | |
private static $__value = 'Foo'; | |
public function getValue() { | |
return self::$__value; | |
} | |
} | |
class B { |
This file contains hidden or 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 | |
$string = uniqid(); | |
$start = microtime(true); | |
for ($i = 0; $i < 1000000; $i++) { | |
crc32($string); | |
} | |
$elapsed = microtime(true) - $start; | |
echo "crc32 => $elapsed\n"; |
This file contains hidden or 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 | |
/** | |
* Configuration options | |
* | |
*/ | |
$iterations = 10000000; | |
info(); | |
/** | |
* Actual Benchmarks to run |
This file contains hidden or 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
#!/opt/local/bin/php | |
<?php | |
// Get a git log | |
$log = trim(`git shortlog -s -n -e`); | |
$log = explode("\n", $log); | |
// Clean and make a new directory for images. | |
`rm -rf gource-gravatars`; | |
mkdir('gource-gravatars'); |
This file contains hidden or 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 | |
$options = array( | |
'repo' => '/Users/predominant/Projects/cakephp/2.0/.git', | |
'titleOrder' => array( | |
'dev', 'alpha', 'beta', 'rc', | |
), | |
'regex' => '/(?<version>[\d\.]+)(?:-(?<title>[a-zA-Z]+)(?:(?<iteration>\d)?))?/', | |
'formats' => array( | |
'plaintext' => '| awk \'{print "Commit: ["$1"]\n"; $1=""; print "-"$0"\n"}\'', | |
'lighthouse' => '| awk \'{print "#### Commit: ["$1"](http://github.com/cakephp/cakephp/commit/"$1")\n"; $1=""; print $0"\n"}\'', |
This file contains hidden or 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
// --- Controller | |
class TestsController extends Controller { | |
public $uses = array(); | |
public function add() { | |
$x = new App(); | |
$x->__cache = 1; |
This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
if ($argc <= 1) { | |
$account = 'CakeDC'; | |
} else { | |
$account = $argv[1]; | |
} | |
if ($argc <= 2) { |
This file contains hidden or 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
#!/bin/bash | |
if [ ! -d "webroot" ]; then | |
echo "Doesn't look like a CakePHP application." | |
echo "Make sure you are in the APP directory." | |
exit 1 | |
fi | |
cd webroot |
This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
if (!defined('TMP')) { | |
define('TMP', getcwd() . DIRECTORY_SEPARATOR . 'tmp' . DIRECTORY_SEPARATOR); | |
} | |
$file = getcwd() . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'database.php'; | |
if (!is_readable($file)) { | |
echo "Can't find database config at : $file\n"; | |
die(1); |
OlderNewer