View gist:4741572
#!/usr/bin/php | |
<?php | |
ini_set('memory_limit', '256M'); | |
set_time_limit(0); | |
require_once('include/local.conf'); | |
require_once(COMMON_INCLUDE_PATH . 'db_mysql.class.php'); | |
$ymds = array(20130107, 20130108, 20130109, 20130110, 20130111, 20130112, 20130113, 20130114, 20130115, 20130116, |
View gist:4211173
for ($i=1; $i<101; $i++) { | |
progress($i, 100, 'Percent Complete: '); | |
usleep(25000); | |
} | |
function progress ($step_x, $of_y, $label = '') { | |
$p = number_format($step_x / $of_y * 100, 1) . '%'; | |
$p = str_pad($p, 5, ' ', STR_PAD_LEFT); | |
if ($label) | |
$p = "{$label} {$p}"; |
View gist:5863839
<?php | |
$namespaces = array( | |
'Sheldon\examples\SignalConsole\*' => __DIR__, | |
'Sheldon\*' => dirname(dirname(__DIR__)) . '/src/', | |
); | |
spl_autoload_register(function ($class) use ($namespaces) { | |
$NAMESPACE_SEPARATOR = '\\'; |
OlderNewer