10 Ways to improve Github Issues
I love the new GitHub issues, here are some ideas to make it perfect, ordered by priority:
<?php | |
class A { | |
private static $__value = 'Foo'; | |
public function getValue() { | |
return self::$__value; | |
} | |
} | |
class B { |
<?php | |
$string = uniqid(); | |
$start = microtime(true); | |
for ($i = 0; $i < 1000000; $i++) { | |
crc32($string); | |
} | |
$elapsed = microtime(true) - $start; | |
echo "crc32 => $elapsed\n"; |
<?php | |
/** | |
* Configuration options | |
* | |
*/ | |
$iterations = 10000000; | |
info(); | |
/** | |
* Actual Benchmarks to run |
#!/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'); |
<?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"}\'', |
// --- Controller | |
class TestsController extends Controller { | |
public $uses = array(); | |
public function add() { | |
$x = new App(); | |
$x->__cache = 1; |
#!/usr/bin/php | |
<?php | |
if ($argc <= 1) { | |
$account = 'CakeDC'; | |
} else { | |
$account = $argv[1]; | |
} | |
if ($argc <= 2) { |
#!/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 |
#!/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); |
I love the new GitHub issues, here are some ideas to make it perfect, ordered by priority: